develooper Front page | perl.perl5.porters | Postings from April 2007

Re: [perl #42601] Inconsistent warning of redefined subroutines in Exporter

Thread Previous | Thread Next
Nicholas Clark
April 19, 2007 05:31
Re: [perl #42601] Inconsistent warning of redefined subroutines in Exporter
Message ID:
On Thu, Apr 19, 2007 at 10:05:30AM +0200, Rafael Garcia-Suarez wrote:
> On 18/04/07, via RT Colin Robertson <> wrote:
> >Running "perl -we 'use Once;'" gives us no warnings, but running "perl
> >-we 'use Once; use Twice;'" gives us:
> >
> >Subroutine Twice::foobar redefined at
> >/usr/local/lib/perl5/5.8.7/ line 65.
> > at line 4
> >
> >Ideally, there should have been a warning just when compiling Once.
> I get a warning with only with perl 5.8.8 (and also bleadperl
> and peprl 5.6.2). Not sure what has changed since 5.8.7...

It might be this one. From perl588delta.pod:

=head2 no warnings 'category' works correctly with -w

Previously when running with warnings enabled globally via C<-w>, selective
disabling of specific warning categories would actually turn off all warnings.
This is now fixed; now C<no warnings 'io';> will only turn off warnings in the
C<io> class. Previously it would erroneously turn off all warnings.

This bug fix may cause some programs to start correctly issuing warnings.


Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About