[libclass-tiny-perl] 02/03: Silence "used only once" warnings for BUILD and DEMOLISH

gregor herrmann gregoa at debian.org
Sun May 31 14:03:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to annotated tag release-0.014
in repository libclass-tiny-perl.

commit f10d651e4442e851b7f0f3ded3fa31bf5062b8b8
Author: Dagfinn Ilmari Mannsåker <ilmari at ilmari.org>
Date:   Thu Nov 28 11:18:38 2013 +0000

    Silence "used only once" warnings for BUILD and DEMOLISH
    
    Commit 030fbc23 made Class::Tiny start warning about
    Devel::PartialDump::BUILD and ::DEMOLISH only being mentioned once,
    breaking downstream tests for expected warnings.
---
 lib/Class/Tiny.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Class/Tiny.pm b/lib/Class/Tiny.pm
index 6f260ac..a9cf39c 100644
--- a/lib/Class/Tiny.pm
+++ b/lib/Class/Tiny.pm
@@ -89,6 +89,7 @@ my $_PRECACHE = sub {
       ? [$class]
       : mro::get_linear_isa($class);
     for my $s ( @{ $LINEAR_ISA_CACHE{$class} } ) {
+        no warnings 'once'; # needed to avoid downstream warnings
         $BUILD_CACHE{$s}    = *{"$s\::BUILD"}{CODE};
         $DEMOLISH_CACHE{$s} = *{"$s\::DEMOLISH"}{CODE};
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libclass-tiny-perl.git



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