New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent warning of redefined subroutines in Exporter #8873
Comments
From colin.robertson@bbc.co.ukGetting bounces if I send with perlbug, but that may be due to our mail This is a bug report for perl from colin.robertson@bbc.co.uk, There is an odd inconsistency in the behaviour of Exporter and the -- Foo.pm -- package Foo; use base 'Exporter'; sub foobar { print "Foo\n" }; 1; -- Bar.pm -- package Bar; use base 'Exporter'; sub foobar { print "Bar\n" }; 1; -- Once.pm -- package Once; use Foo qw( foobar ); 1; -- Twice.pm -- package Twice; use Foo qw( foobar ); 1; -- End -- Running "perl -we 'use Once;'" gives us no warnings, but running "perl Subroutine Twice::foobar redefined at Ideally, there should have been a warning just when compiling Once. This bug, or at least something related to it, was encountered in the use File::Temp; (with File::Temp version 0.16 and File::Slurp version 9999.11). This Subroutine File::Slurp::O_RDWR redefined at On the other hand, when the use statements are reversed, there is no use File::Slurp; I think File::Slurp should actually be warning a lot, regardless of use Fcntl qw( :DEFAULT ) ; It happens that File::Temp makes some use of O_RDWR, O_CREAT and 0_EXCL, Flags: Site configuration information for perl v5.8.8: Configured by comand at Thu Mar 23 17:51:47 EST 2006. Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Locally applied patches: @INC for perl v5.8.8: Environment for perl v5.8.8: PATH=/home/colinr/bin:/home/system/scripts/devtools:/opt/csw/gcc3/bin:/u PERL5LIB=/home/colinr/lib:/home/system/cgi-bin/lib:/home/system/cgi-bin/ -- http://www.bbc.co.uk/ |
From @rgsOn 18/04/07, via RT Colin Robertson <perlbug-followup@perl.org> wrote:
I get a warning with only Once.pm with perl 5.8.8 (and also bleadperl |
The RT System itself - Status changed from 'new' to 'open' |
From @nwc10On Thu, Apr 19, 2007 at 10:05:30AM +0200, Rafael Garcia-Suarez wrote:
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 This bug fix may cause some programs to start correctly issuing warnings. =cut Nicholas Clark |
From colin.robertson@bbc.co.ukRafael Garcia-Suarez via RT wrote:
hmm. Interesting. When I test with perl 5.8.8 on the same machine I -- http://www.bbc.co.uk/ |
From rick@bort.caOn Apr 19 2007, Nicholas Clark wrote:
That seems pretty likely, since Carp::Heavy (ultimately loaded by perl -we 'use warnings; use Once;' And for the in-the-wild case: use warnings; -- |
From colin.robertson@bbc.co.ukRick Delaney via RT wrote:
No, that doesn't appear to be it, unfortunately: colinr@pandora~/projects/exporter-bug $ perl -we 'use warnings; use Also, as I mentioned earlier, I'm still seeing it on 5.8.8: colinr@pandora~/projects/exporter-bug $ perl5.8.8 -we 'use warnings; use -- http://www.bbc.co.uk/ |
From rick@bort.caOn Apr 20 2007, Colin Robertson wrote:
Sorry, I misread that post. You also said you checked %INC. Would you perl -we 'use Once; printf "%6d: %s\n", -s, $_ for sort values %INC;' With 5.8.8 I get: Subroutine Once::foobar redefined at /usr/share/perl/5.8/Exporter.pm line 65. Probably the last 3 will be different because of cut-and-paste
-- |
From colin.robertson@bbc.co.ukRick Delaney via RT wrote:
colinr@pandora~/projects/exporter-bug $ perl5.8.8 -we 'use Once; printf oh. Very different. ok, perhaps time to consider that this 5.8.8 colinr@pandora~/projects/exporter-bug $ perl -we 'use Once; printf "%6d: So at this stage it looks like it's something that may well be fixed in Thanks to all of you for your help. -- http://www.bbc.co.uk/ |
From colin.robertson@bbc.co.ukI've just got round to picking this up again. I asked a friend to do a lentinj@woodchuck:~$ perl -V Characteristics of this binary (from libperl): I don't know why my file sizes were so different on my Perl 5.8.8 -- http://www.bbc.co.uk/ |
From p5p@spam.wizbit.beOn Wed Apr 18 09:17:31 2007, colinr wrote:
Can you run the following command if the problem still exists: perl -wle 'for (qw/Carp Exporter base strict warnings Or can you tar the files and attach them? Kind regards, Bram |
p5p@spam.wizbit.be - Status changed from 'open' to 'stalled' |
From @dcollinsndcollins@nightshade64:~/toolchain/42601$ perl5.25.2 -we 'use Once;' dcollins@nightshade64:~/toolchain/42601$ perl5.8.8 -we "use Once;" 2>&1 -- |
The RT System itself - Status changed from 'stalled' to 'open' |
@dcollinsn - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#42601 (status was 'rejected')
Searchable as RT42601$
The text was updated successfully, but these errors were encountered: