updated more split '' syntax to split //

This commit is contained in:
Matt Simerson 2012-11-20 01:40:57 -05:00
parent 77182ec6e2
commit 4a745d6baf
9 changed files with 19 additions and 17 deletions

View File

@ -354,7 +354,7 @@ sub _load_plugin {
my $self = shift; my $self = shift;
my ($plugin_line, @plugin_dirs) = @_; my ($plugin_line, @plugin_dirs) = @_;
my ($plugin, @args) = split ' ', $plugin_line; my ($plugin, @args) = split / /, $plugin_line;
my $package; my $package;

View File

@ -67,7 +67,7 @@ while (<HEAD>) {
next if /^_/; next if /^_/;
s#(/\*.*\*/)##; s#(/\*.*\*/)##;
my $comment = $1 || ""; my $comment = $1 || "";
my @words = split ' ', $_; my @words = split / /, $_;
my $const = shift @words; my $const = shift @words;
if ($const eq "CLEANUP_STAT_OK") { if ($const eq "CLEANUP_STAT_OK") {
push @out, ""; push @out, "";

View File

@ -195,7 +195,7 @@ sub parse_line_plugin {
my ($tai, $pid, $hook, $plugin, $message ) = split /\s/, $line, 5; my ($tai, $pid, $hook, $plugin, $message ) = split /\s/, $line, 5;
$plugin =~ s/:$//; $plugin =~ s/:$//;
if ( $plugin =~ /_3a/ ) { if ( $plugin =~ /_3a/ ) {
($plugin) = split '_3a', $plugin; # trim :N off the plugin log entry ($plugin) = split /_3a/, $plugin; # trim :N off the plugin log entry
}; };
$plugin =~ s/_2d/-/g; $plugin =~ s/_2d/-/g;
@ -320,7 +320,7 @@ sub populate_plugins_from_registry {
next if ! $aliases; next if ! $aliases;
$aliases =~ s/\s+//g; $aliases =~ s/\s+//g;
$plugins{$name}{aliases} = $aliases; $plugins{$name}{aliases} = $aliases;
foreach my $a ( split ',', $aliases ) { foreach my $a ( split /,/, $aliases ) {
$plugin_aliases{$a} = $name; $plugin_aliases{$a} = $name;
}; };
}; };

View File

@ -53,7 +53,7 @@ sub auth_flat_file {
return ( DENY, "authflat - missing password" ); return ( DENY, "authflat - missing password" );
} }
my ( $pw_name, $pw_domain ) = split '@', lc($user); my ( $pw_name, $pw_domain ) = split /@/, lc($user);
unless ( defined $pw_domain ) { unless ( defined $pw_domain ) {
$self->log(LOGINFO, "fail: missing domain"); $self->log(LOGINFO, "fail: missing domain");

View File

@ -61,7 +61,7 @@ sub auth_vpopmail {
my ($self, $transaction, $method, $user, $passClear, $passHash, $ticket) = my ($self, $transaction, $method, $user, $passClear, $passHash, $ticket) =
@_; @_;
my $pw = vauth_getpw( split '@', lc($user) ); my $pw = vauth_getpw( split /@/, lc($user) );
my $pw_clear_passwd = $pw->{pw_clear_passwd}; my $pw_clear_passwd = $pw->{pw_clear_passwd};
my $pw_passwd = $pw->{pw_passwd}; my $pw_passwd = $pw->{pw_passwd};

View File

@ -104,7 +104,7 @@ sub get_db_handle {
sub get_vpopmail_user { sub get_vpopmail_user {
my ( $self, $dbh, $user ) = @_; my ( $self, $dbh, $user ) = @_;
my ( $pw_name, $pw_domain ) = split '@', lc($user); my ( $pw_name, $pw_domain ) = split /@/, lc($user);
if ( ! defined $pw_domain ) { if ( ! defined $pw_domain ) {
$self->log(LOGINFO, "skip: missing domain: " . lc $user ); $self->log(LOGINFO, "skip: missing domain: " . lc $user );

View File

@ -260,7 +260,7 @@ sub select_username {
$self->log(LOGDEBUG, "Message has $recipient_count recipients"); $self->log(LOGDEBUG, "Message has $recipient_count recipients");
if ( $recipient_count > 1 ) { if ( $recipient_count > 1 ) {
$self->log(LOGINFO, "skipping user prefs, $recipient_count recipients detected."); $self->log(LOGINFO, "multiple recipients ($recipient_count), ignoring user prefs");
return getpwuid($>); return getpwuid($>);
}; };
@ -296,13 +296,13 @@ sub parse_response {
#return $self->parse_response_regexp( $response ); # probably slower #return $self->parse_response_regexp( $response ); # probably slower
my ($user, $result, $class, $prob, $conf, $sig) = split '; ', $response; my ($user, $result, $class, $prob, $conf, $sig) = split /; /, $response;
(undef, $result) = split '=', $result; (undef, $result) = split /=/, $result;
(undef, $class ) = split '=', $class; (undef, $class ) = split /=/, $class;
(undef, $prob ) = split '=', $prob; (undef, $prob ) = split /=/, $prob;
(undef, $conf ) = split '=', $conf; (undef, $conf ) = split /=/, $conf;
(undef, $sig ) = split '=', $sig; (undef, $sig ) = split /=/, $sig;
$result = substr($result, 1, -1); # strip off quotes $result = substr($result, 1, -1); # strip off quotes
$class = substr($class, 1, -1); $class = substr($class, 1, -1);
@ -656,7 +656,9 @@ sub autolearn_spamassassin {
my $sa = $transaction->notes('spamassassin' ); my $sa = $transaction->notes('spamassassin' );
if ( ! $sa || ! $sa->{is_spam} ) { if ( ! $sa || ! $sa->{is_spam} ) {
$self->log(LOGERROR, "SA results missing"); if ( ! $self->connection->notes('naughty') ) {
$self->log(LOGERROR, "SA results missing"); # SA skips naughty
};
return; return;
}; };

View File

@ -98,7 +98,7 @@ sub in_hosts_allow {
my ($ipmask, $const, $message) = split /\s+/, $_, 3; my ($ipmask, $const, $message) = split /\s+/, $_, 3;
next unless defined $const; next unless defined $const;
my ($net,$mask) = split '/', $ipmask, 2; my ($net,$mask) = split /\//, $ipmask, 2;
$mask = 32 if ! defined $mask; $mask = 32 if ! defined $mask;
$mask = pack "B32", "1"x($mask)."0"x(32-$mask); $mask = pack "B32", "1"x($mask)."0"x(32-$mask);
if (join('.', unpack('C4', inet_aton($remote) & $mask)) eq $net) { if (join('.', unpack('C4', inet_aton($remote) & $mask)) eq $net) {

View File

@ -153,7 +153,7 @@ sub read_map {
s/^\s*//; s/^\s*//;
next if /^#/; next if /^#/;
next unless $_; next unless $_;
my ($addr, $code, $msg) = split ' ', $_, 3; my ($addr, $code, $msg) = split / /, $_, 3;
next unless $addr; next unless $addr;
unless ($code) { unless ($code) {