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:
Colin Robertson
Date:
April 20, 2007 07:28
Subject:
RE: [perl #42601] Inconsistent warning of redefined subroutines in Exporter
Message ID:
A6685937DC05A746A178D4A3A3F2747601C01CC9@bbcxues12.national.core.bbc.co.uk
Rick Delaney via RT wrote:
> That seems pretty likely, since Carp::Heavy (ultimately loaded by
> Exporter) has a C<no warnings "once";> in it.  I believe the
> workaround for this in older perls is to make sure to use warnings
> before anything else.  So for Colin's test, try
> 
>     perl -we 'use warnings; use Once;'

No, that doesn't appear to be it, unfortunately:

colinr@pandora~/projects/exporter-bug $ perl -we 'use warnings; use
Once;'
colinr@pandora~/projects/exporter-bug $ perl -we 'use warnings; use
Once; use Twice;'
Subroutine Twice::foobar redefined at
/usr/local/lib/perl5/5.8.7/Exporter.pm line 65.
 at Twice.pm line 4

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
Once;'
colinr@pandora~/projects/exporter-bug $ perl5.8.8 -we 'use warnings; use
Once; use Twice;'
Subroutine Twice::foobar redefined at
/opt/csw/share/perl/5.8.8/Exporter.pm line 65.
 at Twice.pm line 4


-- 
Colin Robertson
Software Engineer, Vision (Factual & Learning)
BBC Future Media & Technology
2507, White City
T: 0208 752 7295

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

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