cvs commit: qpsmtpd/lib Qpsmtpd.pm

[email protected] (Matt Sergeant)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     03/06/23 01:14:26

  Modified:    lib      Qpsmtpd.pm
  Log:
  Don't reload plugins if already loaded (stops warnings under pperl)
  
  Revision  Changes    Path
  1.23      +3 -0      qpsmtpd/lib/Qpsmtpd.pm
  
  Index: Qpsmtpd.pm
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd.pm,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -w -r1.22 -r1.23
  --- Qpsmtpd.pm	11 Jun 2003 08:38:57 -0000	1.22
  +++ Qpsmtpd.pm	23 Jun 2003 08:14:25 -0000	1.23
  @@ -104,6 +104,9 @@
   
       my $plugin_name = $plugin;
   
  +    # don't reload plugins if they are already loaded
  +    next if defined &{"Qpsmtpd::Plugin::${plugin_name}::register"};
  +    
       # Escape everything into valid perl identifiers
       $plugin_name =~ s/([^A-Za-z0-9_\/])/sprintf("_%2x",unpack("C",$1))/eg;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.