[SCM] Debian packaging of liblog-dispatch-perl branch, master, updated. 4e32fc99289d67789cee7baa6f4a9e43628a0fc4

Jonas Genannt jonas at brachium-system.net
Mon May 28 21:45:35 UTC 2012


The following commit has been merged in the master branch:
commit 65164afa167667b6594cabfaec4f039a8e26c51a
Author: Jonas Genannt <jonas at brachium-system.net>
Date:   Mon May 28 23:25:17 2012 +0200

    Adding upstream version 2.32.

diff --git a/Changes b/Changes
index 174ab53..56633b9 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,31 @@
-2.29
+2.32     2012-05-24
+
+- Fix a test failure - test failed if you had 0.16 <= Sys::Syslog < 0.25
+  installed.
+
+- Added a kludgey test failure fix for failure on Cygwin. Patch by Christian
+  Carey. RT #77364.
+
+
+2.31     2012-05-21
+
+- Added missing prereq - Class::Load.
+
+
+2.30     2012-05-20
+
+- Remove Sys::Syslog as a prereq, since you can use this distro perfectly well
+  without it. Fixes RT #52065.
+
+- You can now pass a subroutine reference to the sugar methods like
+  $dispatch->debug() and friends. Requested by Jeffrey Thalhammer. RT #77308.
+
+- Calling sugar methods like $dispatch->warn or $dispatch->crit did not
+  normalize the log level, so the level would be passed to the outputs as
+  "warn", not "warning". Reported by Karen Etheridge. RT #77203.
+
+
+2.29   2011-03-18
 
 - Add is_$level methods for compatibility with Log::Contextual. Patch by frew.
 
@@ -265,7 +292,7 @@ Attribute::Handlers.  Reported by Mike Schilli.
   debug output to STDERR if warnings were on.  Now it's not.
 
 
-2.04 2010-10-16
+2.04   2003-03-21
 
 - The close_after_write option didn't actually do anything.  Fixed by
   JAA Klunder.
@@ -385,26 +412,23 @@ NOTE: 1.5 was never released to CPAN.
 - Log/Dispatch.pm: Added convenience methods for log levels like
   $dispatcher->alert($message).  Suggested by Dominique Dumont.
 
+- This version introduces some changes into the interface that will
+  cause incompatibility with any Log::Dispatch::Output interface you may
+  have created.  However, it is fairly simple to fix.  Simply change the
+  method in your subclass named 'log' to be called 'log_message'.  You
+  can also remove the line:
 
-1.5
-
-This version introduces some changes into the interface that will
-cause incompatibility with any Log::Dispatch::Output interface you may
-have created.  However, it is fairly simple to fix.  Simply change the
-method in your subclass named 'log' to be called 'log_message'.  You
-can also remove the line:
-
-  return unless $self->_should_log($params{level});
+    return unless $self->_should_log($params{level});
 
-This is now done before the message ever gets to the Output subclass
-(which is what it should have done in the first place, really.)
+  This is now done before the message ever gets to the Output subclass
+  (which is what it should have done in the first place, really.)
 
-This was done so that I could allow per-Output object callbacks, a
-feature which several people have requested and which seems useful
-enough to warrant the breakage.
+  This was done so that I could allow per-Output object callbacks, a
+  feature which several people have requested and which seems useful
+  enough to warrant the breakage.
 
-NOTE: This change is transparent if you are only using the Output
-objects included with this distribution.
+  NOTE: This change is transparent if you are only using the Output
+  objects included with this distribution.
 
 - Many: Changed the interface to allow per-Output object level
   callbacks and documented this.
@@ -437,7 +461,7 @@ objects included with this distribution.
   newlines to outgoing messages.
 
 
-1.11   2000-02-24
+1.11  2000-02-24
 
 - Realized I need to tweak the $VERSION in Log::Dispatch
 
diff --git a/MANIFEST b/MANIFEST
index 9bd571d..f66546d 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -6,7 +6,6 @@ META.json
 META.yml
 Makefile.PL
 README
-SIGNATURE
 dist.ini
 lib/Log/Dispatch.pm
 lib/Log/Dispatch/ApacheLog.pm
@@ -29,9 +28,12 @@ t/02-email-exit.t
 t/03-short-syntax.t
 t/email-exit-helper.pl
 t/lib/Log/Dispatch/TestUtil.pm
+t/release-cpan-changes.t
 t/release-eol.t
 t/release-no-tabs.t
 t/release-pod-coverage.t
+t/release-pod-linkcheck.t
+t/release-pod-no404s.t
 t/release-pod-spell.t
 t/release-pod-syntax.t
 t/sendmail
diff --git a/META.json b/META.json
index dafb712..aa2ee14 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Dave Rolsky <autarch at urth.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110240",
+   "generated_by" : "Dist::Zilla version 4.300015, CPAN::Meta::Converter version 2.120900",
    "license" : [
       "artistic_2"
    ],
@@ -14,21 +14,21 @@
    },
    "name" : "Log-Dispatch",
    "prereqs" : {
-      "build" : {
+      "configure" : {
          "requires" : {
-            "File::Temp" : 0,
-            "Test::More" : "0.88"
+            "ExtUtils::MakeMaker" : "6.30"
          }
       },
-      "configure" : {
+      "runtime" : {
          "requires" : {
-            "ExtUtils::MakeMaker" : "6.31"
+            "Class::Load" : "0",
+            "Params::Validate" : "0.15"
          }
       },
-      "runtime" : {
+      "test" : {
          "requires" : {
-            "Params::Validate" : "0.15",
-            "Sys::Syslog" : "0.25"
+            "File::Temp" : "0",
+            "Test::More" : "0.88"
          }
       }
    },
@@ -39,11 +39,11 @@
          "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Log-Dispatch"
       },
       "repository" : {
-         "type" : "hg",
-         "url" : "http://hg.urth.org/hg/Log-Dispatch",
-         "web" : "http://hg.urth.org/hg/Log-Dispatch"
+         "type" : "git",
+         "url" : "git://git.urth.org/Log-Dispatch.git",
+         "web" : "http://git.urth.org/Log-Dispatch.git"
       }
    },
-   "version" : "2.29"
+   "version" : "2.32"
 }
 
diff --git a/META.yml b/META.yml
index d45a9da..49c1c0f 100644
--- a/META.yml
+++ b/META.yml
@@ -6,18 +6,18 @@ build_requires:
   File::Temp: 0
   Test::More: 0.88
 configure_requires:
-  ExtUtils::MakeMaker: 6.31
+  ExtUtils::MakeMaker: 6.30
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110240'
+generated_by: 'Dist::Zilla version 4.300015, CPAN::Meta::Converter version 2.120900'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
   version: 1.4
 name: Log-Dispatch
 requires:
+  Class::Load: 0
   Params::Validate: 0.15
-  Sys::Syslog: 0.25
 resources:
   bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Log-Dispatch
-  repository: http://hg.urth.org/hg/Log-Dispatch
-version: 2.29
+  repository: git://git.urth.org/Log-Dispatch.git
+version: 2.32
diff --git a/Makefile.PL b/Makefile.PL
index 6ca0fbb..78de676 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -4,31 +4,31 @@ use warnings;
 
 
 
-use ExtUtils::MakeMaker 6.31;
+use ExtUtils::MakeMaker 6.30;
 
 
 
 my %WriteMakefileArgs = (
-  'ABSTRACT' => 'Dispatches messages to one or more outputs',
-  'AUTHOR' => 'Dave Rolsky <autarch at urth.org>',
-  'BUILD_REQUIRES' => {
-    'File::Temp' => '0',
-    'Test::More' => '0.88'
+  "ABSTRACT" => "Dispatches messages to one or more outputs",
+  "AUTHOR" => "Dave Rolsky <autarch\@urth.org>",
+  "BUILD_REQUIRES" => {
+    "File::Temp" => 0,
+    "Test::More" => "0.88"
   },
-  'CONFIGURE_REQUIRES' => {
-    'ExtUtils::MakeMaker' => '6.31'
+  "CONFIGURE_REQUIRES" => {
+    "ExtUtils::MakeMaker" => "6.30"
   },
-  'DISTNAME' => 'Log-Dispatch',
-  'EXE_FILES' => [],
-  'LICENSE' => 'artistic_2',
-  'NAME' => 'Log::Dispatch',
-  'PREREQ_PM' => {
-    'Params::Validate' => '0.15',
-    'Sys::Syslog' => '0.25'
+  "DISTNAME" => "Log-Dispatch",
+  "EXE_FILES" => [],
+  "LICENSE" => "artistic_2",
+  "NAME" => "Log::Dispatch",
+  "PREREQ_PM" => {
+    "Class::Load" => 0,
+    "Params::Validate" => "0.15"
   },
-  'VERSION' => '2.29',
-  'test' => {
-    'TESTS' => 't/*.t'
+  "VERSION" => "2.32",
+  "test" => {
+    "TESTS" => "t/*.t"
   }
 );
 
diff --git a/README b/README
index f1e468c..3213ef2 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution Log-Dispatch,
-version 2.29:
+version 2.32:
 
   Dispatches messages to one or more outputs
 
diff --git a/SIGNATURE b/SIGNATURE
deleted file mode 100644
index 4b16d3c..0000000
--- a/SIGNATURE
+++ /dev/null
@@ -1,59 +0,0 @@
-This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.66.
-
-To verify the content in this distribution, first make sure you have
-Module::Signature installed, then type:
-
-    % cpansign -v
-
-It will check each file's integrity, as well as the signature's
-validity.  If "==> Signature verified OK! <==" is not displayed,
-the distribution may already have been compromised, and you should
-not run its Makefile.PL or Build.PL.
-
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-SHA1 7993d66bcaf63571e70cadc1e0ecb1498c6a193e Changes
-SHA1 80e345bffac0ecb01b0293b9825111a2c33b090b INSTALL
-SHA1 c715d20265d2931c7564fc64abfdc4f8ff33e297 LICENSE
-SHA1 222afadc264d57a2e17d19ca2533e946ee8c4bf7 MANIFEST
-SHA1 631dad07d54e115cf279537c45dfe612ad6fd2f5 META.json
-SHA1 0c708e06d75902e401b410766a2e9cc9edbdde48 META.yml
-SHA1 e41783f5e3820d277e72ed8f46f2201d5b489af7 Makefile.PL
-SHA1 b0f16f9c1c2f0cfb75612118ad0178a9f4286ba0 README
-SHA1 579506af92fd4049d11414894c8b0466d9078f91 dist.ini
-SHA1 a2da673d9b55a8527f5b693224b861536b35f10b lib/Log/Dispatch.pm
-SHA1 a5f9c73f5fafdad33d75dd58ad8107cebfa39917 lib/Log/Dispatch/ApacheLog.pm
-SHA1 593ecab31ab9d9789e5843182df0c2a21d144ff8 lib/Log/Dispatch/Base.pm
-SHA1 9caf072fc052761a257d6fc5263286d1bbe2fb3e lib/Log/Dispatch/Email.pm
-SHA1 2e4b746d1d7b7c4256ed5f1a53766ef006dd7aa4 lib/Log/Dispatch/Email/MIMELite.pm
-SHA1 120f0e6e391c7b013af5f3c7255e9573a8cd78ec lib/Log/Dispatch/Email/MailSend.pm
-SHA1 3eefbe062cc14da3c244cf3833eafcc41b5d0fea lib/Log/Dispatch/Email/MailSender.pm
-SHA1 9de13a92eb16eedcbbb51d803294a8500935a6ac lib/Log/Dispatch/Email/MailSendmail.pm
-SHA1 da3600152b9679c20ed4479a8c440cfd9c273159 lib/Log/Dispatch/File.pm
-SHA1 7c1a22198a07d6bc0743d9e48bc27c411a04eba1 lib/Log/Dispatch/File/Locked.pm
-SHA1 2d1336430f86f3fda2739197efb9d30d9ef083ee lib/Log/Dispatch/Handle.pm
-SHA1 28a0873548aae4e31cce0bd8334c47b0d5d9251e lib/Log/Dispatch/Null.pm
-SHA1 07e81bd1118d2537fe09a8607b8dd4d72fdb0ea1 lib/Log/Dispatch/Output.pm
-SHA1 723103444c1c01d8f70a03b194de19951a1d2cc5 lib/Log/Dispatch/Screen.pm
-SHA1 86e0eddaeca8d50943cf014a83bf49dbafc679fd lib/Log/Dispatch/Syslog.pm
-SHA1 898a7de5445e3a2fdb0619ef3755ec63d2c0713b t/00-compile.t
-SHA1 d244bf0cb98ae40026b43c647a85dfb394fff94c t/01-basic.t
-SHA1 071817b6ad68b790908b38dfe9657afcd5d6c200 t/02-email-exit.t
-SHA1 762bc1b1edd792093415cdb7f3e1cadb0e74345d t/03-short-syntax.t
-SHA1 cae62e2988e1623b42d5af18c7059af9225be2ce t/email-exit-helper.pl
-SHA1 66f75fd01fd1c3c4b3fad0a91d66d41c9aa2104d t/lib/Log/Dispatch/TestUtil.pm
-SHA1 a032c41ef6887fab1b900669c2d304fab46680e2 t/release-eol.t
-SHA1 455d1dd1867212a665ad5ea4126b572411de300c t/release-no-tabs.t
-SHA1 867fa319e231e8520cf41baeaf1eba3746031ebb t/release-pod-coverage.t
-SHA1 436b024e862590cb1ef8d608b683bb93bf0056a4 t/release-pod-spell.t
-SHA1 b30cbdfaf935017c4568c0c91b242438cb87786e t/release-pod-syntax.t
-SHA1 16667ed5d34e132bb361b463cd451e880390f334 t/sendmail
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.10 (GNU/Linux)
-
-iEYEARECAAYFAk2Dxj0ACgkQIgMCsV8qvRJ+pACgjrgFUrXVGZUSFj7hFUQl73gJ
-QUgAoJOXzlEKo8yHEtmgq1PO0spPxyhC
-=JgtO
------END PGP SIGNATURE-----
diff --git a/dist.ini b/dist.ini
index 4d8541e..47dd8ad 100644
--- a/dist.ini
+++ b/dist.ini
@@ -4,7 +4,10 @@ license = Artistic_2_0
 copyright_holder = Dave Rolsky
 copyright_year   = 2011
 
-version = 2.29
+version = 2.32
+
+[NextRelease]
+format = %-8v %{yyyy-MM-dd}d
 
 [@Basic]
 
@@ -14,27 +17,29 @@ version = 2.29
 [MetaResources]
 bugtracker.web    = http://rt.cpan.org/NoAuth/Bugs.html?Dist=Log-Dispatch
 bugtracker.mailto = bug-log-dispatch at rt.cpan.org
-repository.url    = http://hg.urth.org/hg/Log-Dispatch
-repository.web    = http://hg.urth.org/hg/Log-Dispatch
-repository.type   = hg
+repository.url    = git://git.urth.org/Log-Dispatch.git
+repository.web    = http://git.urth.org/Log-Dispatch.git
+repository.type   = git
 
 [SurgicalPodWeaver]
 
 [PkgVersion]
 
-[PodSyntaxTests]
-[NoTabsTests]
 [EOLTests]
-[Signature]
-
-[CheckChangeLog]
+[NoTabsTests]
+[PodSyntaxTests]
+[Test::CPAN::Changes]
+[Test::Pod::LinkCheck]
+[Test::Pod::No404s]
 
 [Prereqs]
+Class::Load      = 0
 Params::Validate = 0.15
-Sys::Syslog = 0.25
 
-[Prereqs / BuildRequires]
+[Prereqs / TestRequires]
 File::Temp = 0
 Test::More = 0.88
 
-[@Mercurial]
+[CheckPrereqsIndexed]
+
+[@Git]
diff --git a/lib/Log/Dispatch.pm b/lib/Log/Dispatch.pm
index 6595040..ee164c3 100644
--- a/lib/Log/Dispatch.pm
+++ b/lib/Log/Dispatch.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch;
-BEGIN {
-  $Log::Dispatch::VERSION = '2.29';
+{
+  $Log::Dispatch::VERSION = '2.32';
 }
 
 use 5.006;
@@ -9,18 +9,40 @@ use strict;
 use warnings;
 
 use base qw( Log::Dispatch::Base );
-use Params::Validate qw(validate_with ARRAYREF CODEREF);
+use Class::Load qw( load_class );
+use Params::Validate 0.15 qw(validate_with ARRAYREF CODEREF);
 use Carp ();
 
 our %LEVELS;
 
 BEGIN {
-    foreach my $l (
-        qw( debug info notice warn warning err error crit critical alert emerg emergency )
-        ) {
+    my %level_map = (
+        (
+            map { $_ => $_ }
+                qw(
+                debug
+                info
+                notice
+                warning
+                error
+                critical
+                alert
+                emergency
+                )
+        ),
+        warn  => 'warning',
+        err   => 'error',
+        crit  => 'critical',
+        emerg => 'emergency',
+    );
+
+    foreach my $l ( keys %level_map ) {
         my $sub = sub {
             my $self = shift;
-            $self->log( level => $l, message => "@_" );
+            $self->log(
+                level   => $level_map{$l},
+                message => @_ > 1 ? "@_" : $_[0],
+            );
         };
 
         $LEVELS{$l} = 1;
@@ -87,7 +109,7 @@ sub _add_output {
         ? substr( $class, 1 )
         : "Log::Dispatch::$class";
 
-    _require_dynamic($full_class);
+    load_class($full_class);
 
     $self->add( $full_class->new(@_) );
 }
@@ -238,14 +260,6 @@ sub is_alert     { $_[0]->would_log('alert') }
 sub is_emerg     { $_[0]->would_log('emerg') }
 sub is_emergency { $_[0]->would_log('emergency') }
 
-sub _require_dynamic {
-    my ($class) = @_;
-
-    local $@;
-    eval "require $class";
-    die $@ if $@;
-}
-
 1;
 
 # ABSTRACT: Dispatches messages to one or more outputs
@@ -260,7 +274,7 @@ Log::Dispatch - Dispatches messages to one or more outputs
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
@@ -332,7 +346,7 @@ string following '+' is taken to be a full classname. e.g.
                  [ '+My::Dispatch', min_level => 'info' ] ]
 
 For each inner list, a new output object is created and added to the
-dispatcher (via L</add>).
+dispatcher (via the C<add() method>).
 
 See L<OUTPUT CLASSES> for the parameters that can be used when creating an
 output object.
@@ -396,6 +410,9 @@ If you pass an array to these methods, it will be stringified as is:
 
  $log->alert("@array");
 
+You can also pass a subroutine reference, just like passing one to the
+C<log()> method.
+
 =item * log_and_die( level => $, message => $ or \& )
 
 Has the same behavior as calling C<log()> but calls
@@ -499,11 +516,11 @@ form of generated names, as they may change.
 
 =item * min_level ($)
 
-The minimum L<logging level|Log Levels> this object will accept. Required.
+The minimum L<logging level|LOG LEVELS> this object will accept. Required.
 
 =item * max_level ($)
 
-The maximum L<logging level|Log Levels> this object will accept.  By default
+The maximum L<logging level|LOG LEVELS> this object will accept.  By default
 the maximum is the highest possible level (which means functionally that the
 object has no maximum).
 
@@ -526,7 +543,7 @@ message!
 
 If true, a callback will be added to the end of the callbacks list that adds
 a newline to the end of each message. Default is false, but some
-output classes may decide to make the default true. See L</NEWLINES> for more details.
+output classes may decide to make the default true.
 
 =back
 
@@ -631,7 +648,26 @@ or via email at bug-log-dispatch at rt.cpan.org.
 
 Support questions can be sent to me at my email address, shown below.
 
-The code repository is at http://hg.urth.org/hg/Log-Dispatch.
+=head1 DONATIONS
+
+If you'd like to thank me for the work I've done on this module,
+please consider making a "donation" to me via PayPal. I spend a lot of
+free time creating free software, and would appreciate any support
+you'd care to offer.
+
+Please note that B<I am not suggesting that you must do this> in order
+for me to continue working on this particular software. I will
+continue to do so, inasmuch as I have in the past, for as long as it
+interests me.
+
+Similarly, a donation made in this way will probably not make me work
+on this software much more, unless I get so many donations that I can
+consider working on free software full time, which seems unlikely at
+best.
+
+To donate, log into PayPal and send money to autarch at urth.org or use
+the button on this page:
+L<http://www.urth.org/~autarch/fs-donation.html>
 
 =head1 SEE ALSO
 
diff --git a/lib/Log/Dispatch/ApacheLog.pm b/lib/Log/Dispatch/ApacheLog.pm
index abf1936..00d30f6 100644
--- a/lib/Log/Dispatch/ApacheLog.pm
+++ b/lib/Log/Dispatch/ApacheLog.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::ApacheLog;
-BEGIN {
-  $Log::Dispatch::ApacheLog::VERSION = '2.29';
+{
+  $Log::Dispatch::ApacheLog::VERSION = '2.32';
 }
 
 use strict;
@@ -69,7 +69,7 @@ Log::Dispatch::ApacheLog - Object for logging to Apache::Log objects
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Base.pm b/lib/Log/Dispatch/Base.pm
index 6a6b932..cb63c26 100644
--- a/lib/Log/Dispatch/Base.pm
+++ b/lib/Log/Dispatch/Base.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Base;
-BEGIN {
-  $Log::Dispatch::Base::VERSION = '2.29';
+{
+  $Log::Dispatch::Base::VERSION = '2.32';
 }
 
 use strict;
@@ -60,7 +60,7 @@ Log::Dispatch::Base - Code shared by dispatch and output objects.
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Email.pm b/lib/Log/Dispatch/Email.pm
index 3249500..e0fb92b 100644
--- a/lib/Log/Dispatch/Email.pm
+++ b/lib/Log/Dispatch/Email.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Email;
-BEGIN {
-  $Log::Dispatch::Email::VERSION = '2.29';
+{
+  $Log::Dispatch::Email::VERSION = '2.32';
 }
 
 use strict;
@@ -104,7 +104,7 @@ Log::Dispatch::Email - Base class for objects that send log messages via email
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Email/MIMELite.pm b/lib/Log/Dispatch/Email/MIMELite.pm
index 3d5e7dc..73a046e 100644
--- a/lib/Log/Dispatch/Email/MIMELite.pm
+++ b/lib/Log/Dispatch/Email/MIMELite.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Email::MIMELite;
-BEGIN {
-  $Log::Dispatch::Email::MIMELite::VERSION = '2.29';
+{
+  $Log::Dispatch::Email::MIMELite::VERSION = '2.32';
 }
 
 use strict;
@@ -45,7 +45,7 @@ Log::Dispatch::Email::MIMELite - Subclass of Log::Dispatch::Email that uses the
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Email/MailSend.pm b/lib/Log/Dispatch/Email/MailSend.pm
index 36aaf2a..7fbd244 100644
--- a/lib/Log/Dispatch/Email/MailSend.pm
+++ b/lib/Log/Dispatch/Email/MailSend.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Email::MailSend;
-BEGIN {
-  $Log::Dispatch::Email::MailSend::VERSION = '2.29';
+{
+  $Log::Dispatch::Email::MailSend::VERSION = '2.32';
 }
 
 use strict;
@@ -53,7 +53,7 @@ Log::Dispatch::Email::MailSend - Subclass of Log::Dispatch::Email that uses the
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Email/MailSender.pm b/lib/Log/Dispatch/Email/MailSender.pm
index 54aee66..1a4b530 100644
--- a/lib/Log/Dispatch/Email/MailSender.pm
+++ b/lib/Log/Dispatch/Email/MailSender.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Email::MailSender;
-BEGIN {
-  $Log::Dispatch::Email::MailSender::VERSION = '2.29';
+{
+  $Log::Dispatch::Email::MailSender::VERSION = '2.32';
 }
 
 # By: Joseph Annino
@@ -72,7 +72,7 @@ Log::Dispatch::Email::MailSender - Subclass of Log::Dispatch::Email that uses th
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Email/MailSendmail.pm b/lib/Log/Dispatch/Email/MailSendmail.pm
index fc2ac81..fff5339 100644
--- a/lib/Log/Dispatch/Email/MailSendmail.pm
+++ b/lib/Log/Dispatch/Email/MailSendmail.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Email::MailSendmail;
-BEGIN {
-  $Log::Dispatch::Email::MailSendmail::VERSION = '2.29';
+{
+  $Log::Dispatch::Email::MailSendmail::VERSION = '2.32';
 }
 
 use strict;
@@ -45,7 +45,7 @@ Log::Dispatch::Email::MailSendmail - Subclass of Log::Dispatch::Email that uses
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/File.pm b/lib/Log/Dispatch/File.pm
index cda3b31..7364115 100644
--- a/lib/Log/Dispatch/File.pm
+++ b/lib/Log/Dispatch/File.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::File;
-BEGIN {
-  $Log::Dispatch::File::VERSION = '2.29';
+{
+  $Log::Dispatch::File::VERSION = '2.32';
 }
 
 use strict;
@@ -166,7 +166,7 @@ Log::Dispatch::File - Object for logging to files
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
@@ -213,7 +213,7 @@ default is 'write'.
 
 =item * binmode ($)
 
-A layer name to be passed to binmode, like ":utf8" or ":raw".
+A layer name to be passed to binmode, like ":encoding(UTF-8)" or ":raw".
 
 =item * close_after_write ($)
 
diff --git a/lib/Log/Dispatch/File/Locked.pm b/lib/Log/Dispatch/File/Locked.pm
index 4b629a4..ea1d081 100644
--- a/lib/Log/Dispatch/File/Locked.pm
+++ b/lib/Log/Dispatch/File/Locked.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::File::Locked;
-BEGIN {
-  $Log::Dispatch::File::Locked::VERSION = '2.29';
+{
+  $Log::Dispatch::File::Locked::VERSION = '2.32';
 }
 
 use strict;
@@ -39,7 +39,7 @@ Log::Dispatch::File::Locked - Subclass of Log::Dispatch::File to facilitate lock
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Handle.pm b/lib/Log/Dispatch/Handle.pm
index 71b514c..fb970e4 100644
--- a/lib/Log/Dispatch/Handle.pm
+++ b/lib/Log/Dispatch/Handle.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Handle;
-BEGIN {
-  $Log::Dispatch::Handle::VERSION = '2.29';
+{
+  $Log::Dispatch::Handle::VERSION = '2.32';
 }
 
 use strict;
@@ -49,7 +49,7 @@ Log::Dispatch::Handle - Object for logging to IO::Handle classes
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Null.pm b/lib/Log/Dispatch/Null.pm
index 32c20c2..00a59b6 100644
--- a/lib/Log/Dispatch/Null.pm
+++ b/lib/Log/Dispatch/Null.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Null;
-BEGIN {
-  $Log::Dispatch::Null::VERSION = '2.29';
+{
+  $Log::Dispatch::Null::VERSION = '2.32';
 }
 
 use strict;
@@ -37,7 +37,7 @@ Log::Dispatch::Null - Object that accepts messages and does nothing
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Output.pm b/lib/Log/Dispatch/Output.pm
index 02ebe3e..928cd63 100644
--- a/lib/Log/Dispatch/Output.pm
+++ b/lib/Log/Dispatch/Output.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Output;
-BEGIN {
-  $Log::Dispatch::Output::VERSION = '2.29';
+{
+  $Log::Dispatch::Output::VERSION = '2.32';
 }
 
 use strict;
@@ -188,7 +188,7 @@ Log::Dispatch::Output - Base class for all Log::Dispatch::* objects
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Screen.pm b/lib/Log/Dispatch/Screen.pm
index b44c43d..de5d639 100644
--- a/lib/Log/Dispatch/Screen.pm
+++ b/lib/Log/Dispatch/Screen.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Screen;
-BEGIN {
-  $Log::Dispatch::Screen::VERSION = '2.29';
+{
+  $Log::Dispatch::Screen::VERSION = '2.32';
 }
 
 use strict;
@@ -60,7 +60,7 @@ Log::Dispatch::Screen - Object for logging to the screen
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/lib/Log/Dispatch/Syslog.pm b/lib/Log/Dispatch/Syslog.pm
index c49a993..411de7b 100644
--- a/lib/Log/Dispatch/Syslog.pm
+++ b/lib/Log/Dispatch/Syslog.pm
@@ -1,6 +1,6 @@
 package Log::Dispatch::Syslog;
-BEGIN {
-  $Log::Dispatch::Syslog::VERSION = '2.29';
+{
+  $Log::Dispatch::Syslog::VERSION = '2.32';
 }
 
 use strict;
@@ -13,7 +13,7 @@ use base qw( Log::Dispatch::Output );
 use Params::Validate qw(validate ARRAYREF SCALAR);
 Params::Validate::validation_options( allow_extra => 1 );
 
-use Sys::Syslog 0.16 ();
+use Sys::Syslog 0.25 ();
 
 sub new {
     my $proto = shift;
@@ -108,7 +108,7 @@ Log::Dispatch::Syslog - Object for logging to system log.
 
 =head1 VERSION
 
-version 2.29
+version 2.32
 
 =head1 SYNOPSIS
 
diff --git a/t/00-compile.t b/t/00-compile.t
index e00ac68..cbf7dbe 100644
--- a/t/00-compile.t
+++ b/t/00-compile.t
@@ -9,7 +9,7 @@ my %deps = (
     'File::Locked'        => '',
     Handle                => '',
     Screen                => '',
-    Syslog                => 'Sys::Syslog 0.16',
+    Syslog                => 'Sys::Syslog 0.25',
     'Email::MailSend'     => 'Mail::Send',
     'Email::MIMELite'     => 'MIME::Lite',
     'Email::MailSendmail' => 'Mail::Sendmail',
diff --git a/t/01-basic.t b/t/01-basic.t
index 870e20d..13e578a 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -395,7 +395,7 @@ SKIP:
     );
 }
 
-# test level paramter to callbacks
+# test level parameter to callbacks
 {
     my $level = sub { my %p = @_; return uc $p{level}; };
 
@@ -465,6 +465,36 @@ SKIP:
     }
 }
 
+{
+    my $string;
+    my $dispatch = Log::Dispatch->new(
+        outputs => [
+            [
+                'String',
+                name      => 'string',
+                string    => \$string,
+                min_level => 'debug',
+            ],
+        ],
+    );
+
+    $dispatch->debug( 'foo', 'bar' );
+    is(
+        $string,
+        'foo bar',
+        'passing multiple elements to ->debug stringifies them like an array'
+    );
+
+    $string = q{};
+    $dispatch->debug( sub { 'foo'} );
+    is(
+        $string,
+        'foo',
+        'passing single sub ref to ->debug calls the sub ref'
+    );
+
+}
+
 # Log::Dispatch->level_is_valid method
 {
     foreach my $l (
@@ -597,6 +627,12 @@ SKIP:
             "Mode should be 0777 or 0666"
         );
     }
+    elsif ( $^O =~ /cygwin/i ) {
+        ok(
+            $mode_string == '0777' || $mode_string == '0644',
+            "Mode should be 0777 or 0644"
+        );
+    }
     else {
         is(
             $mode_string, '0777',
@@ -619,7 +655,7 @@ SKIP:
 
     my @chmod;
     no warnings 'once';
-    local *CORE::chmod = sub { @chmod = @_; warn @chmod };
+    local *CORE::GLOBAL::chmod = sub { @chmod = @_; warn @chmod };
 
     $dispatch->add(
         Log::Dispatch::File->new(
@@ -652,7 +688,7 @@ SKIP:
             name      => 'utf8',
             min_level => 'info',
             filename  => $utf8_log,
-            binmode   => ':utf8',
+            binmode   => ':encoding(UTF-8)',
         )
     );
 
@@ -799,7 +835,7 @@ SKIP:
 
     ok( $e, 'died when calling log_and_die()' );
     like( $e, qr{this is my message},     'error contains expected message' );
-    like( $e, qr{01-basic\.t line 7\d\d}, 'error croaked' );
+    like( $e, qr{01-basic\.t line 8\d\d}, 'error croaked' );
 
     is( $string, 'this is my message', 'message is logged' );
 
@@ -951,6 +987,54 @@ SKIP:
     is( $dispatch->max_level, 'emergency', 'max_level is emergency' );
 }
 
+{
+    my $level;
+    my $record_level = sub {
+        my %p = @_;
+        $level = $p{level};
+        return %p;
+    };
+
+    my $dispatch = Log::Dispatch->new(
+        callbacks => $record_level,
+        outputs   => [
+            [
+                'Null',
+                name      => 'null',
+                min_level => 'debug',
+            ],
+        ],
+    );
+
+    $dispatch->warn('foo');
+    is(
+        $level,
+        'warning',
+        'level for call to ->warn is warning'
+    );
+
+    $dispatch->err('foo');
+    is(
+        $level,
+        'error',
+        'level for call to ->err is error'
+    );
+
+    $dispatch->crit('foo');
+    is(
+        $level,
+        'critical',
+        'level for call to ->crit is critical'
+    );
+
+    $dispatch->emerg('foo');
+    is(
+        $level,
+        'emergency',
+        'level for call to ->emerg is emergency'
+    );
+}
+
 done_testing();
 
 package Log::Dispatch::String;
diff --git a/t/02-email-exit.t b/t/02-email-exit.t
index b9d5020..3e25bb6 100644
--- a/t/02-email-exit.t
+++ b/t/02-email-exit.t
@@ -3,7 +3,7 @@ use warnings;
 
 use Test::More;
 
-unless ( -d '.hg' ) {
+unless ( -d '.git' ) {
     plan skip_all => 'This test only runs for the maintainer';
     exit;
 }
diff --git a/t/release-pod-syntax.t b/t/release-cpan-changes.t
similarity index 58%
copy from t/release-pod-syntax.t
copy to t/release-cpan-changes.t
index d46a955..bb5bd1d 100644
--- a/t/release-pod-syntax.t
+++ b/t/release-cpan-changes.t
@@ -7,9 +7,9 @@ BEGIN {
   }
 }
 
-use Test::More;
-
-eval "use Test::Pod 1.41";
-plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
 
-all_pod_files_ok();
+use Test::More;
+eval 'use Test::CPAN::Changes';
+plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
+changes_ok();
+done_testing();
diff --git a/t/release-pod-linkcheck.t b/t/release-pod-linkcheck.t
new file mode 100644
index 0000000..654cf06
--- /dev/null
+++ b/t/release-pod-linkcheck.t
@@ -0,0 +1,28 @@
+#!perl
+
+BEGIN {
+  unless ($ENV{RELEASE_TESTING}) {
+    require Test::More;
+    Test::More::plan(skip_all => 'these tests are for release candidate testing');
+  }
+}
+
+
+use strict;
+use warnings;
+use Test::More;
+
+foreach my $env_skip ( qw(
+  SKIP_POD_LINKCHECK
+) ){
+  plan skip_all => "\$ENV{$env_skip} is set, skipping"
+    if $ENV{$env_skip};
+}
+
+eval "use Test::Pod::LinkCheck";
+if ( $@ ) {
+  plan skip_all => 'Test::Pod::LinkCheck required for testing POD';
+}
+else {
+  Test::Pod::LinkCheck->new->all_pod_ok;
+}
diff --git a/t/release-pod-no404s.t b/t/release-pod-no404s.t
new file mode 100644
index 0000000..da185ec
--- /dev/null
+++ b/t/release-pod-no404s.t
@@ -0,0 +1,29 @@
+#!perl
+
+BEGIN {
+  unless ($ENV{RELEASE_TESTING}) {
+    require Test::More;
+    Test::More::plan(skip_all => 'these tests are for release candidate testing');
+  }
+}
+
+
+use strict;
+use warnings;
+use Test::More;
+
+foreach my $env_skip ( qw(
+  SKIP_POD_NO404S
+  AUTOMATED_TESTING
+) ){
+  plan skip_all => "\$ENV{$env_skip} is set, skipping"
+    if $ENV{$env_skip};
+}
+
+eval "use Test::Pod::No404s";
+if ( $@ ) {
+  plan skip_all => 'Test::Pod::No404s required for testing POD';
+}
+else {
+  all_pod_files_ok();
+}
diff --git a/t/release-pod-spell.t b/t/release-pod-spell.t
index ab617aa..743470a 100644
--- a/t/release-pod-spell.t
+++ b/t/release-pod-spell.t
@@ -27,11 +27,14 @@ local $ENV{LC_ALL} = 'C';
 all_pod_files_spelling_ok;
 
 __DATA__
+API
+CPAN
 Cholet
 Dumont
 Goess
 Manfredi
 Miyagawa
+PayPal
 Pfeiffer
 Rolsky
 STDERR
@@ -50,7 +53,6 @@ classname
 crit
 emerg
 filename
-filename
 ident
 kern
 logopt

-- 
Debian packaging of liblog-dispatch-perl



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