r61979 - in /trunk/liblog-dispatchouli-perl: Changes MANIFEST META.json META.yml Makefile.PL README debian/changelog lib/Log/Dispatchouli.pm lib/Log/Dispatchouli/Proxy.pm t/basic.t t/proxy.t t/release-pod-coverage.t t/release-pod-syntax.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Tue Aug 24 15:44:01 UTC 2010


Author: gregoa
Date: Tue Aug 24 15:43:51 2010
New Revision: 61979

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=61979
Log:
New upstream release.

Removed:
    trunk/liblog-dispatchouli-perl/t/release-pod-coverage.t
Modified:
    trunk/liblog-dispatchouli-perl/Changes
    trunk/liblog-dispatchouli-perl/MANIFEST
    trunk/liblog-dispatchouli-perl/META.json
    trunk/liblog-dispatchouli-perl/META.yml
    trunk/liblog-dispatchouli-perl/Makefile.PL
    trunk/liblog-dispatchouli-perl/README
    trunk/liblog-dispatchouli-perl/debian/changelog
    trunk/liblog-dispatchouli-perl/lib/Log/Dispatchouli.pm
    trunk/liblog-dispatchouli-perl/lib/Log/Dispatchouli/Proxy.pm
    trunk/liblog-dispatchouli-perl/t/basic.t
    trunk/liblog-dispatchouli-perl/t/proxy.t
    trunk/liblog-dispatchouli-perl/t/release-pod-syntax.t

Modified: trunk/liblog-dispatchouli-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/Changes?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/Changes (original)
+++ trunk/liblog-dispatchouli-perl/Changes Tue Aug 24 15:43:51 2010
@@ -1,4 +1,12 @@
 Revision history for Log-Dispatchouli
+
+1.102350  2010-08-23 08:55:17 America/New_York
+          fix a bug in generating tempdirs for file logging (thanks, Sawyer X)
+
+1.102220  2010-08-10 11:09:30 America/New_York
+          added logger muting (mute, unmute, clear_muted, etc.)
+          new_tester turns off log_pid by default
+          internal simplification of Proxy
 
 1.100712  2010-03-12 21:43:13 America/New_York
           add the quiet_fatal argument to suppress apparent double-logging to

Modified: trunk/liblog-dispatchouli-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/MANIFEST?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/MANIFEST (original)
+++ trunk/liblog-dispatchouli-perl/MANIFEST Tue Aug 24 15:43:51 2010
@@ -10,5 +10,4 @@
 lib/Log/Dispatchouli/Proxy.pm
 t/basic.t
 t/proxy.t
-t/release-pod-coverage.t
-t/release-pod-syntax.t
+t/release-pod-syntax.t

Modified: trunk/liblog-dispatchouli-perl/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/META.json?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/META.json (original)
+++ trunk/liblog-dispatchouli-perl/META.json Tue Aug 24 15:43:51 2010
@@ -1,38 +1,231 @@
 {
-   "resources" : {
-      "repository" : "git://git.codesimply.com/Log-Dispatchouli.git"
-   },
-   "meta-spec" : {
-      "version" : 1.4,
-      "url" : "http://module-build.sourceforge.net/META-spec-v1.4.html"
-   },
-   "generated_by" : "Dist::Zilla version 1.100710",
-   "version" : "1.100712",
-   "name" : "Log-Dispatchouli",
+   "abstract" : "a simple wrapper around Log::Dispatch",
    "author" : [
       "Ricardo SIGNES <rjbs at cpan.org>"
    ],
-   "license" : "perl",
-   "build_requires" : {},
-   "requires" : {
-      "Try::Tiny" : "0.04",
-      "Scalar::Util" : "0",
-      "Log::Dispatch::Array" : "0",
-      "overload" : "0",
-      "Sys::Syslog" : "0.16",
-      "Carp" : "0",
-      "Test::More" : "0.88",
-      "Log::Dispatch::File" : "0",
-      "Params::Util" : "0",
-      "Log::Dispatch::Screen" : "0",
-      "Log::Dispatch" : "0",
-      "Log::Dispatch::Syslog" : "0",
-      "Test::Deep" : "0",
-      "String::Flogger" : "0"
+   "dynamic_config" : 0,
+   "generated_by" : "Dist::Zilla version 4.102220, CPAN::Meta::Converter version 2.102160",
+   "license" : [
+      "perl_5"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+      "version" : "2"
    },
-   "abstract" : "a simple wrapper around Log::Dispatch",
-   "configure_requires" : {
-      "ExtUtils::MakeMaker" : "6.11"
+   "name" : "Log-Dispatchouli",
+   "prereqs" : {
+      "configure" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "6.31"
+         }
+      },
+      "runtime" : {
+         "requires" : {
+            "Carp" : 0,
+            "Log::Dispatch" : 0,
+            "Log::Dispatch::Array" : 0,
+            "Log::Dispatch::File" : 0,
+            "Log::Dispatch::Screen" : 0,
+            "Log::Dispatch::Syslog" : 0,
+            "Params::Util" : 0,
+            "Scalar::Util" : 0,
+            "String::Flogger" : 0,
+            "Sys::Syslog" : "0.16",
+            "Try::Tiny" : "0.04",
+            "overload" : 0
+         }
+      },
+      "test" : {
+         "requires" : {
+            "Test::Deep" : 0,
+            "Test::More" : "0.88"
+         }
+      }
+   },
+   "release_status" : "stable",
+   "resources" : {
+      "repository" : {
+         "type" : "git",
+         "url" : "git://git.codesimply.com/Log-Dispatchouli.git"
+      }
+   },
+   "version" : "1.102350",
+   "x_Dist_Zilla" : {
+      "plugins" : [
+         {
+            "class" : "Dist::Zilla::Plugin::GatherDir",
+            "name" : "@RJBS/@Basic/GatherDir",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::PruneCruft",
+            "name" : "@RJBS/@Basic/PruneCruft",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::ManifestSkip",
+            "name" : "@RJBS/@Basic/ManifestSkip",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::MetaYAML",
+            "name" : "@RJBS/@Basic/MetaYAML",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::License",
+            "name" : "@RJBS/@Basic/License",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Readme",
+            "name" : "@RJBS/@Basic/Readme",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::ExtraTests",
+            "name" : "@RJBS/@Basic/ExtraTests",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::ExecDir",
+            "name" : "@RJBS/@Basic/ExecDir",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::ShareDir",
+            "name" : "@RJBS/@Basic/ShareDir",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::MakeMaker",
+            "name" : "@RJBS/@Basic/MakeMaker",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Manifest",
+            "name" : "@RJBS/@Basic/Manifest",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::TestRelease",
+            "name" : "@RJBS/@Basic/TestRelease",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::ConfirmRelease",
+            "name" : "@RJBS/@Basic/ConfirmRelease",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::UploadToCPAN",
+            "name" : "@RJBS/@Basic/UploadToCPAN",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::AutoPrereq",
+            "name" : "@RJBS/AutoPrereq",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::AutoVersion",
+            "name" : "@RJBS/AutoVersion",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::PkgVersion",
+            "name" : "@RJBS/PkgVersion",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::MetaConfig",
+            "name" : "@RJBS/MetaConfig",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::MetaJSON",
+            "name" : "@RJBS/MetaJSON",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::NextRelease",
+            "name" : "@RJBS/NextRelease",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::PodSyntaxTests",
+            "name" : "@RJBS/PodSyntaxTests",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Repository",
+            "name" : "@RJBS/Repository",
+            "version" : "0.13"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::PodWeaver",
+            "name" : "@RJBS/PodWeaver",
+            "version" : "3.101640"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Git::Check",
+            "name" : "@RJBS/@Git/Check",
+            "version" : "1.102090"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Git::Commit",
+            "name" : "@RJBS/@Git/Commit",
+            "version" : "1.102090"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Git::Tag",
+            "name" : "@RJBS/@Git/Tag",
+            "version" : "1.102090"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Git::Push",
+            "name" : "@RJBS/@Git/Push",
+            "version" : "1.102090"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Prereq",
+            "config" : {
+               "Dist::Zilla::Plugin::Prereqs" : {
+                  "phase" : "runtime",
+                  "type" : "requires"
+               }
+            },
+            "name" : "Prereq",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::FinderCode",
+            "name" : ":InstallModules",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::FinderCode",
+            "name" : ":TestFiles",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::FinderCode",
+            "name" : ":ExecFiles",
+            "version" : "4.102220"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::FinderCode",
+            "name" : ":ShareFiles",
+            "version" : "4.102220"
+         }
+      ],
+      "zilla" : {
+         "class" : "Dist::Zilla::Dist::Builder",
+         "config" : {
+            "is_trial" : 0
+         },
+         "version" : "4.102220"
+      }
    }
 }
 

Modified: trunk/liblog-dispatchouli-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/META.yml?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/META.yml (original)
+++ trunk/liblog-dispatchouli-perl/META.yml Tue Aug 24 15:43:51 2010
@@ -2,10 +2,13 @@
 abstract: 'a simple wrapper around Log::Dispatch'
 author:
   - 'Ricardo SIGNES <rjbs at cpan.org>'
-build_requires: {}
+build_requires:
+  Test::Deep: 0
+  Test::More: 0.88
 configure_requires:
-  ExtUtils::MakeMaker: 6.11
-generated_by: 'Dist::Zilla version 1.100710'
+  ExtUtils::MakeMaker: 6.31
+dynamic_config: 0
+generated_by: 'Dist::Zilla version 4.102220, CPAN::Meta::Converter version 2.102160'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,10 +25,147 @@
   Scalar::Util: 0
   String::Flogger: 0
   Sys::Syslog: 0.16
-  Test::Deep: 0
-  Test::More: 0.88
   Try::Tiny: 0.04
   overload: 0
 resources:
   repository: git://git.codesimply.com/Log-Dispatchouli.git
-version: 1.100712
+version: 1.102350
+x_Dist_Zilla:
+  plugins:
+    -
+      class: Dist::Zilla::Plugin::GatherDir
+      name: '@RJBS/@Basic/GatherDir'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::PruneCruft
+      name: '@RJBS/@Basic/PruneCruft'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::ManifestSkip
+      name: '@RJBS/@Basic/ManifestSkip'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::MetaYAML
+      name: '@RJBS/@Basic/MetaYAML'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::License
+      name: '@RJBS/@Basic/License'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::Readme
+      name: '@RJBS/@Basic/Readme'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::ExtraTests
+      name: '@RJBS/@Basic/ExtraTests'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::ExecDir
+      name: '@RJBS/@Basic/ExecDir'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::ShareDir
+      name: '@RJBS/@Basic/ShareDir'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::MakeMaker
+      name: '@RJBS/@Basic/MakeMaker'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::Manifest
+      name: '@RJBS/@Basic/Manifest'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::TestRelease
+      name: '@RJBS/@Basic/TestRelease'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::ConfirmRelease
+      name: '@RJBS/@Basic/ConfirmRelease'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::UploadToCPAN
+      name: '@RJBS/@Basic/UploadToCPAN'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::AutoPrereq
+      name: '@RJBS/AutoPrereq'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::AutoVersion
+      name: '@RJBS/AutoVersion'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::PkgVersion
+      name: '@RJBS/PkgVersion'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::MetaConfig
+      name: '@RJBS/MetaConfig'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::MetaJSON
+      name: '@RJBS/MetaJSON'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::NextRelease
+      name: '@RJBS/NextRelease'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::PodSyntaxTests
+      name: '@RJBS/PodSyntaxTests'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::Repository
+      name: '@RJBS/Repository'
+      version: 0.13
+    -
+      class: Dist::Zilla::Plugin::PodWeaver
+      name: '@RJBS/PodWeaver'
+      version: 3.101640
+    -
+      class: Dist::Zilla::Plugin::Git::Check
+      name: '@RJBS/@Git/Check'
+      version: 1.102090
+    -
+      class: Dist::Zilla::Plugin::Git::Commit
+      name: '@RJBS/@Git/Commit'
+      version: 1.102090
+    -
+      class: Dist::Zilla::Plugin::Git::Tag
+      name: '@RJBS/@Git/Tag'
+      version: 1.102090
+    -
+      class: Dist::Zilla::Plugin::Git::Push
+      name: '@RJBS/@Git/Push'
+      version: 1.102090
+    -
+      class: Dist::Zilla::Plugin::Prereq
+      config:
+        Dist::Zilla::Plugin::Prereqs:
+          phase: runtime
+          type: requires
+      name: Prereq
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::FinderCode
+      name: ':InstallModules'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::FinderCode
+      name: ':TestFiles'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::FinderCode
+      name: ':ExecFiles'
+      version: 4.102220
+    -
+      class: Dist::Zilla::Plugin::FinderCode
+      name: ':ShareFiles'
+      version: 4.102220
+  zilla:
+    class: Dist::Zilla::Dist::Builder
+    config:
+      is_trial: 0
+    version: 4.102220

Modified: trunk/liblog-dispatchouli-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/Makefile.PL?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/Makefile.PL (original)
+++ trunk/liblog-dispatchouli-perl/Makefile.PL Tue Aug 24 15:43:51 2010
@@ -4,46 +4,60 @@
 
 
 
-use ExtUtils::MakeMaker 6.11;
+use ExtUtils::MakeMaker 6.31;
 
 
 
 my %WriteMakefileArgs = (
-                       'test' => {
-                                   'TESTS' => 't/*.t'
-                                 },
-                       'NAME' => 'Log::Dispatchouli',
-                       'DISTNAME' => 'Log-Dispatchouli',
-                       'CONFIGURE_REQUIRES' => {
-                                                 'ExtUtils::MakeMaker' => '6.11'
-                                               },
-                       'AUTHOR' => 'Ricardo SIGNES <rjbs at cpan.org>',
-                       'BUILD_REQUIRES' => {},
-                       'ABSTRACT' => 'a simple wrapper around Log::Dispatch',
-                       'EXE_FILES' => [],
-                       'VERSION' => '1.100712',
-                       'PREREQ_PM' => {
-                                        'Try::Tiny' => '0.04',
-                                        'Scalar::Util' => '0',
-                                        'Log::Dispatch::Array' => '0',
-                                        'overload' => '0',
-                                        'Sys::Syslog' => '0.16',
-                                        'Carp' => '0',
-                                        'Test::More' => '0.88',
-                                        'Log::Dispatch::File' => '0',
-                                        'Params::Util' => '0',
-                                        'Log::Dispatch::Screen' => '0',
-                                        'Log::Dispatch' => '0',
-                                        'Log::Dispatch::Syslog' => '0',
-                                        'Test::Deep' => '0',
-                                        'String::Flogger' => '0'
-                                      },
-                       'LICENSE' => 'perl'
-                     );
+  'ABSTRACT' => 'a simple wrapper around Log::Dispatch',
+  'AUTHOR' => 'Ricardo SIGNES <rjbs at cpan.org>',
+  'BUILD_REQUIRES' => {
+    'Test::Deep' => '0',
+    'Test::More' => '0.88'
+  },
+  'CONFIGURE_REQUIRES' => {
+    'ExtUtils::MakeMaker' => '6.31'
+  },
+  'DISTNAME' => 'Log-Dispatchouli',
+  'EXE_FILES' => [],
+  'LICENSE' => 'perl',
+  'NAME' => 'Log::Dispatchouli',
+  'PREREQ_PM' => {
+    'Carp' => '0',
+    'Log::Dispatch' => '0',
+    'Log::Dispatch::Array' => '0',
+    'Log::Dispatch::File' => '0',
+    'Log::Dispatch::Screen' => '0',
+    'Log::Dispatch::Syslog' => '0',
+    'Params::Util' => '0',
+    'Scalar::Util' => '0',
+    'String::Flogger' => '0',
+    'Sys::Syslog' => '0.16',
+    'Try::Tiny' => '0.04',
+    'overload' => '0'
+  },
+  'VERSION' => '1.102350',
+  'test' => {
+    'TESTS' => 't/*.t'
+  }
+);
 
 
-delete $WriteMakefileArgs{LICENSE}
-  unless eval { ExtUtils::MakeMaker->VERSION(6.31) };
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
+  my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
+  my $pp = $WriteMakefileArgs{PREREQ_PM};
+  for my $mod ( keys %$br ) {
+    if ( exists $pp->{$mod} ) {
+      $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
+    }
+    else {
+      $pp->{$mod} = $br->{$mod};
+    }
+  }
+}
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+  unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
 
 WriteMakefile(%WriteMakefileArgs);
 

Modified: trunk/liblog-dispatchouli-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/README?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/README (original)
+++ trunk/liblog-dispatchouli-perl/README Tue Aug 24 15:43:51 2010
@@ -1,7 +1,7 @@
 
 
-This archive contains the distribution Log-Dispatchouli, version
-1.100712:
+This archive contains the distribution Log-Dispatchouli,
+version 1.102350:
 
   a simple wrapper around Log::Dispatch
 
@@ -10,3 +10,4 @@
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
 
+

Modified: trunk/liblog-dispatchouli-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/debian/changelog?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/debian/changelog (original)
+++ trunk/liblog-dispatchouli-perl/debian/changelog Tue Aug 24 15:43:51 2010
@@ -1,3 +1,9 @@
+liblog-dispatchouli-perl (1.102350-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Tue, 24 Aug 2010 17:42:35 +0200
+
 liblog-dispatchouli-perl (1.100712-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/liblog-dispatchouli-perl/lib/Log/Dispatchouli.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/lib/Log/Dispatchouli.pm?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/lib/Log/Dispatchouli.pm (original)
+++ trunk/liblog-dispatchouli-perl/lib/Log/Dispatchouli.pm Tue Aug 24 15:43:51 2010
@@ -1,7 +1,9 @@
 use strict;
 use warnings;
 package Log::Dispatchouli;
-our $VERSION = '1.100712';
+BEGIN {
+  $Log::Dispatchouli::VERSION = '1.102350';
+}
 # ABSTRACT: a simple wrapper around Log::Dispatch
 
 use Carp ();
@@ -41,7 +43,7 @@
   if ($arg->{to_file}) {
     require Log::Dispatch::File;
     my $log_file = File::Spec->catfile(
-      ($ENV{DISPATCHOULI_PATH} || File::Spec->tempdir),
+      ($ENV{DISPATCHOULI_PATH} || File::Spec->tmpdir),
       sprintf('%s.%04u%02u%02u',
         $ident,
         ((localtime)[5] + 1900),
@@ -131,30 +133,33 @@
   my $arg = _HASH0($rest[0]) ? shift(@rest) : {};
 
   my $message;
-  try {
-    my @flogged = map {; String::Flogger->flog($_) } @rest;
-    $message    = @flogged > 1 ? $self->_join(\@flogged) : $flogged[0];
-
-    my $prefix  = _ARRAY0($arg->{prefix})
-                ? [ @{ $arg->{prefix} } ]
-                : [ $arg->{prefix} ];
-
-    for (reverse grep { defined } $self->get_prefix, @$prefix) {
-      if (_CODELIKE( $_ )) {
-        $message = $_->($message);
-      } else {
-        $message =~ s/^/$_/gm;
+
+  if ($arg->{fatal} or ! $self->get_muted) {
+    try {
+      my @flogged = map {; String::Flogger->flog($_) } @rest;
+      $message    = @flogged > 1 ? $self->_join(\@flogged) : $flogged[0];
+
+      my $prefix  = _ARRAY0($arg->{prefix})
+                  ? [ @{ $arg->{prefix} } ]
+                  : [ $arg->{prefix} ];
+
+      for (reverse grep { defined } $self->get_prefix, @$prefix) {
+        if (_CODELIKE( $_ )) {
+          $message = $_->($message);
+        } else {
+          $message =~ s/^/$_/gm;
+        }
       }
-    }
-
-    $self->dispatcher->log(
-      level   => $arg->{level} || 'info',
-      message => $message,
-    );
-  } catch {
-    $message = '(no message could be logged)' unless defined $message;
-    die $_ if $self->{fail_fatal};
-  };
+
+      $self->dispatcher->log(
+        level   => $arg->{level} || 'info',
+        message => $message,
+      );
+    } catch {
+      $message = '(no message could be logged)' unless defined $message;
+      die $_ if $self->{fail_fatal};
+    };
+  }
 
   Carp::croak $message if $arg->{fatal};
 
@@ -164,8 +169,9 @@
 
 sub log_fatal {
   my ($self, @rest) = @_;
-  my $arg;
-  $arg = _HASH0($rest[0]) ? shift(@rest) : {}; # for future expansion
+
+  my $arg = _HASH0($rest[0]) ? shift(@rest) : {}; # for future expansion
+
   local $arg->{level} = defined $arg->{level} ? $arg->{level} : 'error';
   local $arg->{fatal} = defined $arg->{fatal} ? $arg->{fatal} : 1;
 
@@ -178,8 +184,8 @@
 
   return unless $self->is_debug;
 
-  my $arg;
-  $arg = _HASH0($rest[0]) ? shift(@rest) : {}; # for future expansion
+  my $arg = _HASH0($rest[0]) ? shift(@rest) : {}; # for future expansion
+
   local $arg->{level} = defined $arg->{level} ? $arg->{level} : 'debug';
 
   $self->log($arg, @rest);
@@ -195,6 +201,20 @@
 
 
 sub clear_debug { }
+
+sub mute   { $_[0]{muted} = 1 }
+sub unmute { $_[0]{muted} = 0 }
+
+
+sub set_muted {
+  return($_[0]->{muted} = $_[1] ? 1 : 0);
+}
+
+
+sub get_muted { return $_[0]->{muted} }
+
+
+sub clear_muted { }
 
 
 sub get_prefix   { return $_[0]->{prefix}  }
@@ -209,6 +229,7 @@
 
   return $class->new({
     ident     => "$$:$0",
+    log_pid   => 0,
     %$arg,
     to_stderr => 0,
     to_stdout => 0,
@@ -282,7 +303,7 @@
 
 =head1 VERSION
 
-version 1.100712
+version 1.102350
 
 =head1 SYNOPSIS
 
@@ -336,6 +357,7 @@
   facility    - to which syslog facility to send logs; default: none
   log_pid     - if true, prefix all log entries with the pid; default: true
   fail_fatal  - a boolean; if true, failure to log is fatal; default: true
+  muted       - a boolean; if true, only fatals are logged; default: false
   debug       - a boolean; if true, log_debug method is not a no-op
                 defaults to the truth of the DISPATCHOULI_DEBUG env var
   quiet_fatal - 'stderr' or 'stdout' or an arrayref of zero, one, or both
@@ -395,6 +417,23 @@
 This method does nothing, and is only useful for L<Log::Dispatchouli::Proxy>
 objects.  See L<Methods for Proxy Loggers|/METHODS FOR PROXY LOGGERS>, below.
 
+=head2 set_muted
+
+  $logger->set_muted($bool);
+
+This sets the logger's muted property, which affects the behavior of
+C<log>.
+
+=head2 get_muted
+
+This gets the logger's muted property, which affects the behavior of
+C<log>.
+
+=head2 clear_muted
+
+This method does nothing, and is only useful for L<Log::Dispatchouli::Proxy>
+objects.  See L<Methods for Proxy Loggers|/METHODS FOR PROXY LOGGERS>, below.
+
 =head2 get_prefix
 
   my $prefix = $logger->get_prefix;
@@ -562,7 +601,7 @@
 
 =head1 AUTHOR
 
-  Ricardo SIGNES <rjbs at cpan.org>
+Ricardo SIGNES <rjbs at cpan.org>
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: trunk/liblog-dispatchouli-perl/lib/Log/Dispatchouli/Proxy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/lib/Log/Dispatchouli/Proxy.pm?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/lib/Log/Dispatchouli/Proxy.pm (original)
+++ trunk/liblog-dispatchouli-perl/lib/Log/Dispatchouli/Proxy.pm Tue Aug 24 15:43:51 2010
@@ -1,7 +1,9 @@
 use strict;
 use warnings;
 package Log::Dispatchouli::Proxy;
-our $VERSION = '1.100712';
+BEGIN {
+  $Log::Dispatchouli::Proxy::VERSION = '1.102350';
+}
 # ABSTRACT: a simple wrapper around Log::Dispatch
 
 use Params::Util qw(_ARRAY0 _HASH0);
@@ -28,6 +30,7 @@
     parent => $self,
     logger => $self->logger,
     debug  => $arg->{debug},
+    muted  => $arg->{muted},
     proxy_prefix => $arg->{proxy_prefix},
   });
 }
@@ -48,6 +51,19 @@
   return $_[0]->parent->get_debug;
 }
 
+sub mute   { $_[0]{muted} = 1 }
+sub unmute { $_[0]{muted} = 0 }
+
+sub set_muted    { $_[0]{muted} = $_[1] ? 1 : 0 }
+sub clear_muted  { undef $_[0]{muted} }
+
+sub _get_local_muted { $_[0]{muted} }
+
+sub get_muted {
+  return $_[0]{muted} if defined $_[0]{muted};
+  return $_[0]->parent->get_muted;
+}
+
 sub _get_all_prefix {
   my ($self, $arg) = @_;
 
@@ -61,6 +77,9 @@
 sub log {
   my ($self, @rest) = @_;
   my $arg = _HASH0($rest[0]) ? shift(@rest) : {};
+
+  return if $self->_get_local_muted and ! $arg->{fatal};
+
   local $arg->{prefix} = $self->_get_all_prefix($arg);
 
   $self->parent->log($arg, @rest);
@@ -70,9 +89,9 @@
   my ($self, @rest) = @_;
 
   my $arg = _HASH0($rest[0]) ? shift(@rest) : {};
-  local $arg->{prefix} = $self->_get_all_prefix($arg);
+  local $arg->{fatal}  = 1;
 
-  $self->parent->log_fatal($arg, @rest);
+  $self->log($arg, @rest);
 }
 
 sub log_debug {
@@ -82,15 +101,9 @@
   return if defined $debug and ! $debug;
 
   my $arg = _HASH0($rest[0]) ? shift(@rest) : {};
-  local $arg->{prefix} = $self->_get_all_prefix($arg);
+  local $arg->{level} = 'debug';
 
-  if ($debug) {
-    local $arg->{level} = 'debug';
-    $self->parent->log($arg, @rest);
-    return;
-  }
-
-  $self->parent->log_debug($arg, @rest);
+  $self->log($arg, @rest);
 }
 
 1;
@@ -104,7 +117,7 @@
 
 =head1 VERSION
 
-version 1.100712
+version 1.102350
 
 =head1 DESCRIPTION
 
@@ -133,7 +146,7 @@
 
 =head1 AUTHOR
 
-  Ricardo SIGNES <rjbs at cpan.org>
+Ricardo SIGNES <rjbs at cpan.org>
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: trunk/liblog-dispatchouli-perl/t/basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/t/basic.t?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/t/basic.t (original)
+++ trunk/liblog-dispatchouli-perl/t/basic.t Tue Aug 24 15:43:51 2010
@@ -6,7 +6,7 @@
 use Test::Deep;
 
 {
-  my $logger = Log::Dispatchouli->new_tester({ to_self => 1 });
+  my $logger = Log::Dispatchouli->new_tester({ log_pid => 1 });
 
   isa_ok($logger, 'Log::Dispatchouli');
 
@@ -161,4 +161,40 @@
   );
 }
 
+{
+  my $logger = Log::Dispatchouli->new_tester({ debug => 1 });
+
+  $logger->log('info');
+  $logger->log('debug');
+
+  cmp_deeply(
+    $logger->events,
+    [
+      superhashof({ message => 'info' }),
+      superhashof({ message => 'debug' }),
+    ],
+    'info and debug while not muted',
+  );
+
+  $logger->clear_events;
+
+  $logger->mute;
+
+  $logger->log('info');
+  $logger->log('debug');
+
+  cmp_deeply($logger->events, [ ], 'nothing logged while muted');
+
+  ok(
+    ! eval { $logger->log_fatal('fatal'); 1},
+    "log_fatal still dies while muted",
+  );
+
+  cmp_deeply(
+    $logger->events,
+    [ superhashof({ message => 'fatal' }) ],
+    'logged a fatal even while muted'
+  );
+}
+
 done_testing;

Modified: trunk/liblog-dispatchouli-perl/t/proxy.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/t/proxy.t?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/t/proxy.t (original)
+++ trunk/liblog-dispatchouli-perl/t/proxy.t Tue Aug 24 15:43:51 2010
@@ -4,11 +4,7 @@
 use Log::Dispatchouli;
 use Test::More 0.88;
 
-my $logger = Log::Dispatchouli->new_tester({
-  ident   => 'proxy-test',
-  log_pid => 0,
-  to_self => 1,
-});
+my $logger = Log::Dispatchouli->new_tester;
 
 sub are_events {
   my ($comment, $want) = @_;
@@ -104,6 +100,48 @@
   'A: B: C: proxy debug',
 ]);
 
+sub unmute_all {
+  $_->clear_muted for ($proxy, $proxprox);
+  $logger->unmute;
+};
+
+unmute_all;
+
+$proxprox->mute;
+$proxprox->log("proxprox");
+$proxy->log("proxy");
+$logger->log("logger");
+
+are_events("only muted proxprox", [
+  'A: B: C: proxy',
+  'A: logger',
+]);
+
+unmute_all;
+
+$proxy->mute;
+
+$proxprox->log("proxprox");
+$proxy->log("proxy");
+$logger->log("logger");
+
+are_events("muted proxy", [
+  'A: logger',
+]);
+
+unmute_all;
+
+$proxprox->unmute;
+$proxy->mute;
+
+$proxprox->log("proxprox");
+$proxy->log("proxy");
+$logger->log("logger");
+
+are_events("muted proxy, unmuted proxprox", [
+  'A: logger',
+]);
+
 ok($logger->logger == $logger,   "logger->logger == logger");
 ok($proxy->logger == $logger,    "proxy->logger == logger");
 ok($proxprox->logger == $logger, "proxprox->logger == logger");

Modified: trunk/liblog-dispatchouli-perl/t/release-pod-syntax.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblog-dispatchouli-perl/t/release-pod-syntax.t?rev=61979&op=diff
==============================================================================
--- trunk/liblog-dispatchouli-perl/t/release-pod-syntax.t (original)
+++ trunk/liblog-dispatchouli-perl/t/release-pod-syntax.t Tue Aug 24 15:43:51 2010
@@ -9,7 +9,7 @@
 
 use Test::More;
 
-eval "use Test::Pod 1.00";
-plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+eval "use Test::Pod 1.41";
+plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
 
-all_pod_files_ok();
+all_pod_files_ok();




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