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

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

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
April 19, 2007 05:31
Subject:
Re: [perl #42601] Inconsistent warning of redefined subroutines in Exporter
Message ID:
20070419123119.GI69960@plum.flirble.org
On Thu, Apr 19, 2007 at 10:05:30AM +0200, Rafael Garcia-Suarez wrote:
> On 18/04/07, via RT Colin Robertson <perlbug-followup@perl.org> 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/Exporter.pm line 65.
> > at Twice.pm line 4
> >
> >Ideally, there should have been a warning just when compiling Once.
> 
> I get a warning with only Once.pm 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.

=cut

Nicholas Clark

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