r65251 - in /branches/upstream/liblog-handler-perl/current: ChangeLog META.yml lib/Log/Handler.pm

carnil at users.alioth.debian.org carnil at users.alioth.debian.org
Thu Nov 25 13:35:13 UTC 2010


Author: carnil
Date: Thu Nov 25 13:34:50 2010
New Revision: 65251

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=65251
Log:
[svn-upgrade] new version liblog-handler-perl (0.68)

Modified:
    branches/upstream/liblog-handler-perl/current/ChangeLog
    branches/upstream/liblog-handler-perl/current/META.yml
    branches/upstream/liblog-handler-perl/current/lib/Log/Handler.pm

Modified: branches/upstream/liblog-handler-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblog-handler-perl/current/ChangeLog?rev=65251&op=diff
==============================================================================
--- branches/upstream/liblog-handler-perl/current/ChangeLog (original)
+++ branches/upstream/liblog-handler-perl/current/ChangeLog Thu Nov 25 13:34:50 2010
@@ -1,3 +1,7 @@
+0.68    Released at 2010-11-24.
+        - Fixed a bug in add(). It wasn't possible to pass more
+          than one output configuration to add().
+
 0.67    Released at 2010-10-10.
         - Fixed a bug in set_level. The new level was set correctly
           but no message was logged because the output wasn't added

Modified: branches/upstream/liblog-handler-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblog-handler-perl/current/META.yml?rev=65251&op=diff
==============================================================================
--- branches/upstream/liblog-handler-perl/current/META.yml (original)
+++ branches/upstream/liblog-handler-perl/current/META.yml Thu Nov 25 13:34:50 2010
@@ -1,6 +1,6 @@
 ---
 name: Log-Handler
-version: 0.67
+version: 0.68
 author:
   - Jonny Schulz
 abstract: Log messages to several outputs.
@@ -29,7 +29,7 @@
 provides:
   Log::Handler:
     file: lib/Log/Handler.pm
-    version: 0.67
+    version: 0.68
   Log::Handler::Config:
     file: lib/Log/Handler/Config.pm
     version: 0.07

Modified: branches/upstream/liblog-handler-perl/current/lib/Log/Handler.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblog-handler-perl/current/lib/Log/Handler.pm?rev=65251&op=diff
==============================================================================
--- branches/upstream/liblog-handler-perl/current/lib/Log/Handler.pm (original)
+++ branches/upstream/liblog-handler-perl/current/lib/Log/Handler.pm Thu Nov 25 13:34:50 2010
@@ -1051,7 +1051,7 @@
 use UNIVERSAL;
 use base qw(Log::Handler::Levels);
 
-our $VERSION = "0.67";
+our $VERSION = "0.68";
 our $ERRSTR  = "";
 
 # $TRACE and $CALLER_LEVEL are both used as global
@@ -1197,25 +1197,29 @@
 }
 
 sub add {
-    my $self = shift;
-
-    if ($_[0] && $_[0] eq "config") {
-        return $self->config(@_);
-    }
-
-    if (@_ > 2) {
-        while (@_) {
-            my $type = shift;
-            my $conf = shift;
+    my ($self, @args) = @_;
+
+    if ($args[0] && $args[0] eq "config") {
+        return $self->config(@args);
+    }
+
+    if (@args > 2) {
+        if (@args % 2 != 0) {
+            Carp::croak 'Odd number of arguments to Log::Handler::add';
+        }
+        while (@args) {
+            my $type = shift @args;
+            my $conf = shift @args;
             $self->add($type, $conf);
         }
+        return 1;
     }
 
     # At first the config will be splitted into
     # the package name (Log::Handler::Output::*),
     # the options for the handler and the options
     # for the output-module.
-    my ($package, $h_opts, $o_opts) = $self->_split_config(@_);
+    my ($package, $h_opts, $o_opts) = $self->_split_config(@args);
 
     # In the next step the handler options
     # must be validated.




More information about the Pkg-perl-cvs-commits mailing list