replace all instances of split '' with split //

newer versions of perl don't accept split '' syntax any longer
This commit is contained in:
Matt Simerson 2012-11-19 12:32:21 -05:00
parent 2e0909ad27
commit d80b117bff
4 changed files with 12 additions and 10 deletions

View File

@ -342,8 +342,8 @@ sub _addr_cmp {
} }
#invert the address so we can sort by domain then user #invert the address so we can sort by domain then user
($left = join( '=', reverse( split('@', $left->format))) ) =~ tr/[<>]//d; ($left = join( '=', reverse( split(/@/, $left->format))) ) =~ tr/[<>]//d;
($right = join( '=', reverse( split('@',$right->format))) ) =~ tr/[<>]//d; ($right = join( '=', reverse( split(/@/,$right->format))) ) =~ tr/[<>]//d;
if ( $swap ) { if ( $swap ) {
($right, $left) = ($left, $right); ($right, $left) = ($left, $right);

View File

@ -144,7 +144,7 @@ sub get_auth_details_cram_md5 {
return; return;
}; };
my ( $user, $passHash ) = split( ' ', decode_base64($line) ); my ( $user, $passHash ) = split( / /, decode_base64($line) );
unless ( $user && $passHash ) { unless ( $user && $passHash ) {
$session->respond(504, "Invalid authentication string"); $session->respond(504, "Invalid authentication string");
return; return;
@ -170,7 +170,7 @@ sub validate_password {
my ( $self, %a ) = @_; my ( $self, %a ) = @_;
my ($pkg, $file, $line) = caller(); my ($pkg, $file, $line) = caller();
$file = (split '/', $file)[-1]; # strip off the path $file = (split /\//, $file)[-1]; # strip off the path
my $src_clear = $a{src_clear}; my $src_clear = $a{src_clear};
my $src_crypt = $a{src_crypt}; my $src_crypt = $a{src_crypt};

View File

@ -174,12 +174,12 @@ sub start_conversation {
my $conn = $self->connection; my $conn = $self->connection;
# set remote_host, remote_ip and remote_port # set remote_host, remote_ip and remote_port
my ($ip, $port) = split(':', $self->peer_addr_string); my ($ip, $port) = split(/:/, $self->peer_addr_string);
return $self->close() unless $ip; return $self->close() unless $ip;
$conn->remote_ip($ip); $conn->remote_ip($ip);
$conn->remote_port($port); $conn->remote_port($port);
$conn->remote_info("[$ip]"); $conn->remote_info("[$ip]");
my ($lip,$lport) = split(':', $self->local_addr_string); my ($lip,$lport) = split(/:/, $self->local_addr_string);
$conn->local_ip($lip); $conn->local_ip($lip);
$conn->local_port($lport); $conn->local_port($lport);

View File

@ -457,8 +457,8 @@ sub check_ip_match {
return; return;
}; };
my $dns_net = join('.', (split('\.', $ip))[0,1,2] ); my $dns_net = join('.', (split(/\./, $ip))[0,1,2] );
my $rem_net = join('.', (split('\.', $self->qp->connection->remote_ip))[0,1,2] ); my $rem_net = join('.', (split(/\./, $self->qp->connection->remote_ip))[0,1,2] );
if ( $dns_net eq $rem_net ) { if ( $dns_net eq $rem_net ) {
$self->log( LOGNOTICE, "forward network match" ); $self->log( LOGNOTICE, "forward network match" );
@ -470,14 +470,16 @@ sub check_name_match {
my $self = shift; my $self = shift;
my ($dns_name, $helo_name) = @_; my ($dns_name, $helo_name) = @_;
return if ! $dns_name;
if ( $dns_name eq $helo_name ) { if ( $dns_name eq $helo_name ) {
$self->log( LOGDEBUG, "reverse name match" ); $self->log( LOGDEBUG, "reverse name match" );
$self->connection->notes('helo_reverse_match', 1); $self->connection->notes('helo_reverse_match', 1);
return; return;
}; };
my $dns_dom = join('.', (split('\.', $dns_name ))[-2,-1] ); my $dns_dom = join('.', (split(/\./, $dns_name ))[-2,-1] );
my $helo_dom = join('.', (split('\.', $helo_name))[-2,-1] ); my $helo_dom = join('.', (split(/\./, $helo_name))[-2,-1] );
if ( $dns_dom eq $helo_dom ) { if ( $dns_dom eq $helo_dom ) {
$self->log( LOGNOTICE, "reverse domain match" ); $self->log( LOGNOTICE, "reverse domain match" );