develooper Front page | perl.perl5.porters | Postings from October 2005

Re: [perl #36781] warnings.pm: enabled/warn/warnif functions: bug.(PATCH)

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
October 26, 2005 05:10
Subject:
Re: [perl #36781] warnings.pm: enabled/warn/warnif functions: bug.(PATCH)
Message ID:
20051026141019.5041dfe3@grubert.mandrakesoft.com
Animator (via RT) wrote:
> #!/usr/bin/perl
> 
> sub sub1 {
>   sub2();
> }
> 
> sub sub2 {
>   use warnings qw/void/;
>   print warnings::enabled('void');
> }
> 
> sub1();
> 
> Output:
> 
> This outputs 0, even though the warning is enabled.

I think that's intended behaviour. This function is used
to check whether a calling module is using your module with some
category of warnings enabled.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About