Bug#481227: signing-party: Name 'GnuPG::Options::*" used only once: possible typo at /usr/lib/perl5/Class/MethodMaker/Engine.pm line 781

Damyan Ivanov dmn at debian.org
Sun May 25 10:48:34 UTC 2008


-=| gregor herrmann, Sun, May 25, 2008 at 12:17:42AM +0200 |=-
> Another possibility is to turn off this specific type of warnings
> locally in the if() condition. I've committed the following patch to
> our svn repo:
> 
> #v+
> 
> Author: gregor herrmann <gregoa at debian.org>
> Bugs: #481227, CPAN#35840
> Description: locally turn off warning 'Name " Foo::Bar" used only once'
> 
> --- libclass-methodmaker-perl.orig/lib/Class/MethodMaker/Engine.pm
> +++ libclass-methodmaker-perl/lib/Class/MethodMaker/Engine.pm
> @@ -778,6 +778,8 @@
>          *{$methname} = $code;
>          # Generate a unique stash name for the sub.  Use a preceding space
>          # to avoid collisions with anything in the Perl space.
> +        # Turn off warnings about 'Name " Foo::Bar" used only once'.
> +        no warnings "once";
>          Class::MethodMaker::set_sub_name($code, $target, $name, " ${target}::${name}");
>        }
>      } else {
> 
> #v-

Looks OK to me. The 'no warnings "once"' seems like the right way to 
do that since the stash name is intentionally unique.


-- 
dam            JabberID: dam at jabber.minus273.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20080525/f689dd09/attachment.pgp 


More information about the pkg-perl-maintainers mailing list