Index: lib/Mail/SpamAssassin/Bayes.pm =================================================================== --- lib/Mail/SpamAssassin/Bayes.pm (revision 1880105) +++ lib/Mail/SpamAssassin/Bayes.pm (working copy) @@ -111,7 +111,7 @@ { # DMK, koppel@ece.lsu.edu: Hoping that the ultimate fix to bug 2263 will # make it unnecessary to construct a PerMsgStatus here. - my $PMS = new Mail::SpamAssassin::PerMsgStatus $self->{main}, $msg; + my $PMS = Mail::SpamAssassin::PerMsgStatus->new($self->{main}, $msg); my $ignore = $self->ignore_message($PMS); $PMS->finish(); return 0 if $ignore; Index: lib/Mail/SpamAssassin/Locker/Flock.pm =================================================================== --- lib/Mail/SpamAssassin/Locker/Flock.pm (revision 1880105) +++ lib/Mail/SpamAssassin/Locker/Flock.pm (working copy) @@ -55,7 +55,7 @@ my $lock_file = "$path.mutex"; my $umask = umask(~$mode); - my $fh = new IO::File(); + my $fh = IO::File->new; if (!$fh->open ($lock_file, O_RDWR|O_CREAT)) { umask $umask; # just in case Index: lib/Mail/SpamAssassin/Locker/UnixNFSSafe.pm =================================================================== --- lib/Mail/SpamAssassin/Locker/UnixNFSSafe.pm (revision 1880105) +++ lib/Mail/SpamAssassin/Locker/UnixNFSSafe.pm (working copy) @@ -76,7 +76,7 @@ die "locker: safe_lock: cannot create tmp lockfile $lock_tmp for $lock_file: $!\n"; } umask $umask; - autoflush LTMP 1; + LTMP->autoflush(1); dbg("locker: safe_lock: created $lock_tmp"); for (my $retries = 0; $retries < $max_retries; $retries++) { @@ -150,7 +150,7 @@ warn "locker: safe_unlock: failed to create lock tmpfile $lock_tmp: $!"; return; } else { - autoflush LTMP 1; + LTMP->autoflush(1); print LTMP "\n" or warn "Error writing to $lock_tmp: $!"; if (!(@stat_ourtmp = stat(LTMP)) || (scalar(@stat_ourtmp) < 11)) { Index: lib/Mail/SpamAssassin/NetSet.pm =================================================================== --- lib/Mail/SpamAssassin/NetSet.pm (revision 1880105) +++ lib/Mail/SpamAssassin/NetSet.pm (working copy) @@ -33,7 +33,7 @@ eval { require Net::Patricia; Net::Patricia->VERSION(1.16); # need AF_INET6 support - import Net::Patricia; + Net::Patricia->import; $have_patricia = 1; }; } Index: lib/Mail/SpamAssassin/Plugin/OLEVBMacro.pm =================================================================== --- lib/Mail/SpamAssassin/Plugin/OLEVBMacro.pm (revision 1880105) +++ lib/Mail/SpamAssassin/Plugin/OLEVBMacro.pm (working copy) @@ -76,10 +76,10 @@ BEGIN { eval{ - import Archive::Zip qw( :ERROR_CODES :CONSTANTS ) + Archive::Zip->import(qw( :ERROR_CODES :CONSTANTS )) }; eval{ - import IO::String + IO::String->import }; } Index: lib/Mail/SpamAssassin/SQLBasedAddrList.pm =================================================================== --- lib/Mail/SpamAssassin/SQLBasedAddrList.pm (revision 1880105) +++ lib/Mail/SpamAssassin/SQLBasedAddrList.pm (working copy) @@ -79,7 +79,7 @@ use re 'taint'; # Do this silliness to stop RPM from finding DBI as required -BEGIN { require DBI; import DBI; } +BEGIN { require DBI; DBI->import; } use Mail::SpamAssassin::PersistentAddrList; use Mail::SpamAssassin::Logger; Index: lib/Mail/SpamAssassin/Util.pm =================================================================== --- lib/Mail/SpamAssassin/Util.pm (revision 1880105) +++ lib/Mail/SpamAssassin/Util.pm (working copy) @@ -1974,7 +1974,7 @@ $SIG{ALRM} = $handler; } else { # may be using "safe" signals with %SIG; use POSIX to avoid it - POSIX::sigaction POSIX::SIGALRM(), new POSIX::SigAction $handler; + POSIX::sigaction POSIX::SIGALRM(), POSIX::SigAction->new($handler); } } Index: lib/Mail/SpamAssassin.pm =================================================================== --- lib/Mail/SpamAssassin.pm (revision 1880105) +++ lib/Mail/SpamAssassin.pm (working copy) @@ -427,8 +427,8 @@ $self->timer_enable(); } - $self->{conf} ||= new Mail::SpamAssassin::Conf ($self); - $self->{plugins} = Mail::SpamAssassin::PluginHandler->new ($self); + $self->{conf} ||= Mail::SpamAssassin::Conf->new($self); + $self->{plugins} = Mail::SpamAssassin::PluginHandler->new($self); $self->{save_pattern_hits} ||= 0; @@ -468,7 +468,7 @@ # for slow but safe, by keeping in quotes eval ' use Mail::SpamAssassin::Locker::'.$class.'; - $self->{locker} = new Mail::SpamAssassin::Locker::'.$class.' ($self); + $self->{locker} = Mail::SpamAssassin::Locker::'.$class.'->new($self); 1; ' or do { my $eval_stat = $@ ne '' ? $@ : "errno=$!"; chomp $eval_stat; @@ -831,7 +831,7 @@ $self->{bayes_scanner}->finish() if $self->{bayes_scanner}; if ($self->{conf}->{use_bayes}) { require Mail::SpamAssassin::Bayes; - $self->{bayes_scanner} = new Mail::SpamAssassin::Bayes ($self); + $self->{bayes_scanner} = Mail::SpamAssassin::Bayes->new($self); } else { delete $self->{bayes_scanner} if $self->{bayes_scanner}; } @@ -1771,7 +1771,7 @@ # Initialize the Bayes subsystem if ($self->{conf}->{use_bayes}) { require Mail::SpamAssassin::Bayes; - $self->{bayes_scanner} = new Mail::SpamAssassin::Bayes ($self); + $self->{bayes_scanner} = Mail::SpamAssassin::Bayes->new($self); } $self->{'learn_to_journal'} = $self->{conf}->{bayes_learn_to_journal}; Index: sa-check_spamd.raw =================================================================== --- sa-check_spamd.raw (revision 1880105) +++ sa-check_spamd.raw (working copy) @@ -213,10 +213,10 @@ # only uses the first line of output. my $client; if (defined $opt{'port'}) { - $client = new Mail::SpamAssassin::Client({port => $opt{'port'}, - host => $opt{'hostname'}}); + $client = Mail::SpamAssassin::Client->new({port => $opt{'port'}, + host => $opt{'hostname'}}); } else { - $client = new Mail::SpamAssassin::Client({socketpath => $opt{'socketpath'}}); + $client = Mail::SpamAssassin::Client->new({socketpath => $opt{'socketpath'}}); } # this'd be weird, but totally dependent on the client Index: sa-compile.raw =================================================================== --- sa-compile.raw (revision 1880105) +++ sa-compile.raw (working copy) @@ -149,7 +149,7 @@ ).join("\n", @{$opt{'cf'}})."\n"; -my $spamtest = new Mail::SpamAssassin( +my $spamtest = Mail::SpamAssassin->new( { rules_filename => $opt{'configpath'}, site_rules_filename => $opt{'siteconfigpath'}, Index: sa-learn.raw =================================================================== --- sa-learn.raw (revision 1880105) +++ sa-learn.raw (working copy) @@ -217,7 +217,7 @@ $post_config .= join("\n", @{$opt{'cf'}})."\n"; # create the tester factory -$spamtest = new Mail::SpamAssassin( +$spamtest = Mail::SpamAssassin->new( { rules_filename => $opt{'configpath'}, site_rules_filename => $opt{'siteconfigpath'}, @@ -459,7 +459,7 @@ ########################################################################### - my $iter = new Mail::SpamAssassin::ArchiveIterator( + my $iter = Mail::SpamAssassin::ArchiveIterator->new( { # skip messages larger than max-size bytes, # 0 for no limit, undef defaults to 256 KB Index: sa-update.raw =================================================================== --- sa-update.raw (revision 1880105) +++ sa-update.raw (working copy) @@ -96,7 +96,7 @@ BEGIN { # Deal with optional modules - eval { require Digest::SHA; import Digest::SHA qw(sha256_hex sha512_hex); 1 } and do { $have_sha256=1; $have_sha512=1 } + eval { require Digest::SHA; Digest::SHA->import(qw(sha256_hex sha512_hex)); 1 } and do { $have_sha256=1; $have_sha512=1 } or die "Unable to verify file hashes! You must install a modern version of Digest::SHA."; $have_lwp = eval { @@ -1953,7 +1953,7 @@ # due to the Logger module's globalness (all M::SA objects share the same # Logger setup), we can't change the debug level here to only include # "config" or otherwise be more terse. :( - my $spamtest = new Mail::SpamAssassin( { + my $spamtest = Mail::SpamAssassin->new( { rules_filename => $dir, site_rules_filename => $LOCAL_RULES_DIR, ignore_site_cf_files => 1, Index: spamassassin.raw =================================================================== --- spamassassin.raw (revision 1880105) +++ spamassassin.raw (working copy) @@ -252,7 +252,7 @@ if ($opt{'lint'}) { $opt{'local'} = 1; } # create the tester factory -my $spamtest = new Mail::SpamAssassin( +my $spamtest = Mail::SpamAssassin->new( { rules_filename => $opt{'configpath'}, site_rules_filename => $opt{'siteconfigpath'}, @@ -378,7 +378,7 @@ setup_sig_handlers(); # Everything below here needs ArchiveIterator ... -my $iter = new Mail::SpamAssassin::ArchiveIterator( +my $iter = Mail::SpamAssassin::ArchiveIterator->new( { 'opt_max_size' => 0, # no limit 'opt_want_date' => 0 Index: spamd/spamd.raw =================================================================== --- spamd/spamd.raw (revision 1880105) +++ spamd/spamd.raw (working copy) @@ -53,7 +53,7 @@ # Socket->VERSION(1.95); # provides AI_ADDRCONFIG Socket->VERSION(1.96); # provides NIx_NOSERV, and Exporter tag :addrinfo # Socket->VERSION(1.97); # IO::Socket::IP depends on Socket 1.97 - import Socket qw(/^(?:AI|NI|NIx|EAI)_/); + Socket->import(qw(/^(?:AI|NI|NIx|EAI)_/)); # AUTOLOADing 'constants' here enables inlining - see Exporter man page &AI_ADDRCONFIG; &AI_PASSIVE; @@ -64,13 +64,13 @@ require Socket6; # Socket6->VERSION(0.13); # provides NI_NAMEREQD Socket6->VERSION(0.18); # provides AI_NUMERICSERV - import Socket6 qw(/^(?:AI|NI|NIx|EAI)_/); + Socket6->import(qw(/^(?:AI|NI|NIx|EAI)_/)); &AI_ADDRCONFIG; &AI_PASSIVE; # enable inlining &NI_NUMERICHOST; &NI_NUMERICSERV; &NI_NAMEREQD; 1; }; require Socket; - import Socket qw(:DEFAULT IPPROTO_TCP); + Socket->import(qw(:DEFAULT IPPROTO_TCP)); &SOCK_STREAM; &IPPROTO_TCP; &SOMAXCONN; # enable inlining @@ -315,7 +315,7 @@ } require Pod::Usage; - import Pod::Usage; + Pod::Usage->import; pod2usage( -verbose => 0, -message => $message, @@ -509,7 +509,7 @@ "but Net::Ident is unavailable: $@\n"; $opt{'ident-timeout'} = undef if $opt{'ident-timeout'} <= 0.0; - import Net::Ident qw(ident_lookup); + Net::Ident->import(qw(ident_lookup)); } ### Begin initialization of logging ########################