User: sits    
  Date: 08/01/08 22:16:06

  Modified:    .        CHANGELOG
               bin      install.pl
               lib/Codestriker/TopicListeners Email.pm
  Log:
  * Only require Authen::SASL as a pre-requisite if SMTP authentication
    is needed.  For some deployments, installing Authen::SASL can be
    inconvenient.
  
  
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
  retrieving revision 1.219
  retrieving revision 1.220
  diff -u -r1.219 -r1.220
  --- CHANGELOG 9 Jan 2008 04:08:52 -0000       1.219
  +++ CHANGELOG 9 Jan 2008 06:16:05 -0000       1.220
  @@ -9,6 +9,10 @@
   
   * Make sure the email subject field properly encodes underscores and
     question marks.  Submitted by [EMAIL PROTECTED]
  +
  +* Only require Authen::SASL as a pre-requisite if SMTP authentication
  +  is needed.  For some deployments, installing Authen::SASL can be
  +  inconvenient.
        
   Version 1.9.4
   
  
  
  
  
  
  Index: install.pl
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/bin/install.pl,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- install.pl        10 Aug 2006 23:56:56 -0000      1.12
  +++ install.pl        9 Jan 2008 06:16:05 -0000       1.13
  @@ -109,11 +109,6 @@
           name => 'Encode::Unicode', 
           version => '0',
           optional => 0
  -    },
  -    { 
  -        name => 'Authen::SASL', 
  -        version => '0',
  -        optional => 0
       }
   ];
   
  @@ -126,6 +121,16 @@
       push @{$modules}, $database->get_module_dependencies();
   };
   
  +# Check if Authen::SASL is required.
  +if (defined $Codestriker::mailuser && $Codestriker::mailuser ne "" &&
  +    defined $Codestriker::mailpasswd) {
  +    # The next statement is a no-op, but it stops perl from issuing
  +    # a warning about mailpasswd only being used once.  Unlike the
  +    # username, the password could be empty.
  +    $Codestriker::mailpasswd = $Codestriker::mailpasswd;
  +    push @{$modules}, { name => 'Authen::SASL', version => '0' };
  +}
  +
   # Check for various character encoding modules that are required.
   if (defined $Codestriker::topic_text_encoding) {
       if ($Codestriker::topic_text_encoding =~ /euc\-cn|gb2312|hz|gbk/) {
  
  
  
  
  
  Index: Email.pm
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/lib/Codestriker/TopicListeners/Email.pm,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Email.pm  9 Jan 2008 04:08:53 -0000       1.24
  +++ Email.pm  9 Jan 2008 06:16:05 -0000       1.25
  @@ -17,7 +17,6 @@
   use MIME::Base64;
   use Sys::Hostname;
   use Encode qw(encode);
  -use Authen::SASL;
   
   use Codestriker::TopicListeners::TopicListener;
   
  @@ -445,7 +444,10 @@
       defined $smtp || return "Unable to connect to mail server: $!";
   
       # Perform SMTP authentication if required.
  -    if (defined $Codestriker::mailuser && defined $Codestriker::mailpasswd) {
  +    if (defined $Codestriker::mailuser && $Codestriker::mailuser ne "" &&
  +     defined $Codestriker::mailpasswd) {
  +     eval 'use Authen::SASL';
  +     die "Unable to load Authen::SASL module: [EMAIL PROTECTED]" if $@;
        $smtp->auth($Codestriker::mailuser, $Codestriker::mailpasswd);
       }
   
  
  
  

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits

Reply via email to