Skip to content
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

Closed
p5pRT opened this issue Apr 18, 2007 · 15 comments
Closed

Inconsistent warning of redefined subroutines in Exporter #8873

p5pRT opened this issue Apr 18, 2007 · 15 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 18, 2007

Migrated from rt.perl.org#42601 (status was 'rejected')

Searchable as RT42601$

@p5pRT
Copy link
Author

p5pRT commented Apr 18, 2007

From colin.robertson@bbc.co.uk

Getting bounces if I send with perlbug, but that may be due to our mail
server configuration, so retrying manually​:

This is a bug report for perl from colin.robertson@​bbc.co.uk,
generated with the help of perlbug 1.35 running under perl v5.8.8.

There is an odd inconsistency in the behaviour of Exporter and the
points at which it warns about redefining subroutines. Consider the
following modules​:

-- Foo.pm --

package Foo;

use base 'Exporter';
our @​EXPORT_OK = qw( foobar );

sub foobar { print "Foo\n" };

1;

-- Bar.pm --

package Bar;

use base 'Exporter';
our @​EXPORT_OK = qw( foobar );

sub foobar { print "Bar\n" };

1;

-- Once.pm --

package Once;

use Foo qw( foobar );
use Bar qw( foobar );

1;

-- Twice.pm --

package Twice;

use Foo qw( foobar );
use Bar qw( foobar );

1;

-- End --

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.

This bug, or at least something related to it, was encountered in the
wild with code that effectively did​:

use File​::Temp;
use File​::Slurp;

(with File​::Temp version 0.16 and File​::Slurp version 9999.11). This
gives us the warning​:

Subroutine File​::Slurp​::O_RDWR redefined at
/usr/local/cps_perl5.8.7/site_perl/File/Slurp.pm line 7
Subroutine File​::Slurp​::O_CREAT redefined at
/usr/local/cps_perl5.8.7/site_perl/File/Slurp.pm line 7
Subroutine File​::Slurp​::O_EXCL redefined at
/usr/local/cps_perl5.8.7/site_perl/File/Slurp.pm line 7

On the other hand, when the use statements are reversed, there is no
warning​:

use File​::Slurp;
use File​::Temp;

I think File​::Slurp should actually be warning a lot, regardless of
anything else that happens, because the following lines import a bunch
of duplicated symbols​:

use Fcntl qw( :DEFAULT ) ;
use POSIX qw( :fcntl_h ) ;

It happens that File​::Temp makes some use of O_RDWR, O_CREAT and 0_EXCL,
which triggers the warning in File​::Slurp.


Flags​:
  category=library
  severity=low


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​:
  Platform​:
  osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi
  uname='sunos ra 5.8 generic_117350-28 sun4u sparc
sunw,sun-blade-1000'
  config_args=''
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=undef use64bitall=undef uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -xO3 -xarch=v8 -xspace -xildoff
-I/opt/csw/bdb43/include -I/opt/csw/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
  optimize='-xO3 -xarch=v8 -xspace -xildoff',
  cppflags='-D_REENTRANT -xO3 -xarch=v8 -xspace -xildoff
-I/opt/csw/bdb43/include -I/opt/csw/include'
  ccversion='Sun C 5.7 2005/01/07', gccversion='', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags ='-xarch=v8 -L/opt/csw/bdb43/lib -L/opt/csw/lib
-L/usr/lib -L/usr/ccs/lib -L/lib'
  libpth=/usr/lib /usr/ccs/lib /lib /opt/csw/lib
  libs=-lsocket -lnsl -lgdbm -ldb-4.3 -ldl -lm -lpthread -lc
  perllibs=-lsocket -lnsl -ldb-4.3 -ldl -lm -lpthread -lc
  libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R
/opt/csw/lib'
  cccdlflags='-KPIC', lddlflags='-G -L/opt/csw/bdb43/lib
-L/opt/csw/lib -L/usr/lib -L/usr/ccs/lib -L/lib'

Locally applied patches​:
 


@​INC for perl v5.8.8​:
  /home/colinr/lib
  /home/system/cgi-bin/lib
  /home/system/cgi-bin/lib/sun4-solaris
  /opt/csw/lib/perl/5.8.8
  /opt/csw/share/perl/5.8.8
  /opt/csw/lib/perl/site_perl
  /opt/csw/share/perl/site_perl
  /opt/csw/share/perl/site_perl
  /opt/csw/lib/perl/csw
  /opt/csw/share/perl/csw
  /opt/csw/share/perl/csw
  .


Environment for perl v5.8.8​:
  HOME=/home/colinr
  LANG (unset)
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)

PATH=/home/colinr/bin​:/home/system/scripts/devtools​:/opt/csw/gcc3/bin​:/u
sr/local/bin​:/opt/csw/bin​:/usr/sfw/bin​:/usr/bin​:/usr/ccs/bin​:/usr/local/
scripts​:/usr/ucb​:/u01/app/oracle/product/9.2.0.1.0/bin​:/u01/app/oracle/p
roduct/9.2.0.1.0/xsql/bin​:/usr/openwin/bin​:/usr/local/cps_perl5.6.1/bin​:
/opt/xml-xalan/c/bin​:/usr/local/mysql/bin

PERL5LIB=/home/colinr/lib​:/home/system/cgi-bin/lib​:/home/system/cgi-bin/
lib/sun4-solaris
  PERL_BADLANG (unset)
  SHELL=/usr/bin/bash

--
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.
 

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2007

From @rgs

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...

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2007

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2007

From @nwc10

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

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2007

From colin.robertson@bbc.co.uk

Rafael Garcia-Suarez via RT wrote​:

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...

hmm. Interesting. When I test with perl 5.8.8 on the same machine I
still get no warning with just Once.pm. I've checked %INC and it does
seem to be loading the 5.8.8 modules. I don't have any other
installations of perl 5.8.8 to play with, unfortunately, nor 5.6.2.

--
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.
 

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2007

From rick@bort.ca

On Apr 19 2007, Nicholas Clark wrote​:

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

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;'

And for the in-the-wild case​:

  use warnings;
  use File​::Slurp;
  use File​::Temp;

--
Rick Delaney
rick@​bort.ca

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2007

From colin.robertson@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.
 

@p5pRT
Copy link
Author

p5pRT commented Apr 20, 2007

From rick@bort.ca

On Apr 20 2007, Colin Robertson wrote​:

Also, as I mentioned earlier, I'm still seeing it on 5.8.8​:

Sorry, I misread that post. You also said you checked %INC. Would you
mind checking again? Try this​:

  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.
at Once.pm line 5
  4112​: /usr/share/perl/5.8/Carp.pm
  5747​: /usr/share/perl/5.8/Carp/Heavy.pm
  2218​: /usr/share/perl/5.8/Exporter.pm
  3975​: /usr/share/perl/5.8/base.pm
  599​: /usr/share/perl/5.8/strict.pm
  1149​: /usr/share/perl/5.8/vars.pm
13018​: /usr/share/perl/5.8/warnings.pm
  732​: /usr/share/perl/5.8/warnings/register.pm
  103​: Bar.pm
  103​: Foo.pm
  65​: Once.pm

Probably the last 3 will be different because of cut-and-paste
whitespace differences.

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

--
Rick Delaney
rick@​bort.ca

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2007

From colin.robertson@bbc.co.uk

Rick Delaney via RT wrote​:

On Apr 20 2007, Colin Robertson wrote​:

Also, as I mentioned earlier, I'm still seeing it on 5.8.8​:

Sorry, I misread that post. You also said you checked %INC. Would
you
mind checking again? Try this​:

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. at Once.pm line 5
4112​: /usr/share/perl/5.8/Carp.pm
5747​: /usr/share/perl/5.8/Carp/Heavy.pm
2218​: /usr/share/perl/5.8/Exporter.pm
3975​: /usr/share/perl/5.8/base.pm
599​: /usr/share/perl/5.8/strict.pm
1149​: /usr/share/perl/5.8/vars.pm
13018​: /usr/share/perl/5.8/warnings.pm
732​: /usr/share/perl/5.8/warnings/register.pm
103​: Bar.pm
103​: Foo.pm
65​: Once.pm

Probably the last 3 will be different because of cut-and-paste
whitespace differences.

colinr@​pandora~/projects/exporter-bug $ perl5.8.8 -we 'use Once; printf
"%6d​: %s\n", -s, $_ for sort values %INC;'
  8840​: /opt/csw/share/perl/5.8.8/Carp.pm
14419​: /opt/csw/share/perl/5.8.8/Exporter.pm
  5488​: /opt/csw/share/perl/5.8.8/base.pm
  3292​: /opt/csw/share/perl/5.8.8/strict.pm
  2358​: /opt/csw/share/perl/5.8.8/vars.pm
15879​: /opt/csw/share/perl/5.8.8/warnings.pm
  1023​: /opt/csw/share/perl/5.8.8/warnings/register.pm
  101​: Bar.pm
  101​: Foo.pm
  63​: Once.pm

oh. Very different. ok, perhaps time to consider that this 5.8.8
installation is a somewhat dodgy. It's actually similar, though not
quite identical, to our 5.8.7 installation​:

colinr@​pandora~/projects/exporter-bug $ perl -we 'use Once; printf "%6d​:
%s\n", -s, $_ for sort values %INC;'
  8840​: /usr/local/lib/perl5/5.8.7/Carp.pm
14419​: /usr/local/lib/perl5/5.8.7/Exporter.pm
  5488​: /usr/local/lib/perl5/5.8.7/base.pm
  3292​: /usr/local/lib/perl5/5.8.7/strict.pm
  2358​: /usr/local/lib/perl5/5.8.7/vars.pm
15793​: /usr/local/lib/perl5/5.8.7/warnings.pm
  1014​: /usr/local/lib/perl5/5.8.7/warnings/register.pm
  101​: Bar.pm
  101​: Foo.pm
  63​: Once.pm

So at this stage it looks like it's something that may well be fixed in
5.8.8 and it may just be that our 5.8.8 installation is borked for one
reason or another. It doesn't appear to be the "no warnings 'category'
works correctly with -w" fix, since the problem is still there with 'use
warnings' at the start under 5.8.7. But the next thing to do is for me
to investigate this 5.8.8 installation to see if it's unhealthy.

Thanks to all of you for your help.

--
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.
 

@p5pRT
Copy link
Author

p5pRT commented May 31, 2007

From colin.robertson@bbc.co.uk

I've just got round to picking this up again. I asked a friend to do a
test on his Perl 5.8.8 installation and he's still seeing the bug​:

lentinj@​woodchuck​:~$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration​:
  Platform​:
  osname=linux, osvers=2.6.17-rc1,
archname=sparc-linux-gnu-thread-multi
  uname='linux auric 2.6.17-rc1 #1 smp wed apr 12 21​:45​:35 edt 2006
sparc64 gnulinux '
  config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=sparc-linux-gnu -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.8.8
-Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm
-Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=undef use64bitall=undef uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -pipe -I/usr/local/include'
  ccversion='', gccversion='4.1.2 20061115 (prerelease) (Debian
4.1.1-20)', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib
  libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
  perllibs=-ldl -lm -lpthread -lc -lcrypt
  libc=/lib/libc-2.3.6.so, so=so, useshrplib=true,
libperl=libperl.so.5.8.8
  gnulibc_version='2.3.6'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl)​:
  Compile-time options​: MULTIPLICITY PERL_IMPLICIT_CONTEXT
  PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS
  USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
  Built under linux
  Compiled at Dec 6 2006 17​:48​:33
  @​INC​:
  /etc/perl
  /usr/local/lib/perl/5.8.8
  /usr/local/share/perl/5.8.8
  /usr/lib/perl5
  /usr/share/perl5
  /usr/lib/perl/5.8
  /usr/share/perl/5.8
  /usr/local/lib/site_perl
  /usr/local/lib/perl/5.8.4
  /usr/local/share/perl/5.8.4
  .
lentinj@​woodchuck​:~/exporter-bug$ perl -we 'use Once; printf "%6d​:
%s\n", -s, $_ for sort values %INC;'
  4112​: /usr/share/perl/5.8/Carp.pm
  2218​: /usr/share/perl/5.8/Exporter.pm
  3975​: /usr/share/perl/5.8/base.pm
  599​: /usr/share/perl/5.8/strict.pm
  1149​: /usr/share/perl/5.8/vars.pm
13018​: /usr/share/perl/5.8/warnings.pm
  732​: /usr/share/perl/5.8/warnings/register.pm
  101​: Bar.pm
  101​: Foo.pm
  63​: Once.pm
lentinj@​woodchuck​:~/exporter-bug$ perl -we 'use Once; use Twice; printf
"%6d​: %s\n", -s, $_ for sort values %INC;'
Subroutine Twice​::foobar redefined at /usr/share/perl/5.8/Exporter.pm
line 65.
at Twice.pm line 4
  4112​: /usr/share/perl/5.8/Carp.pm
  5747​: /usr/share/perl/5.8/Carp/Heavy.pm
  2218​: /usr/share/perl/5.8/Exporter.pm
  3975​: /usr/share/perl/5.8/base.pm
  599​: /usr/share/perl/5.8/strict.pm
  1149​: /usr/share/perl/5.8/vars.pm
13018​: /usr/share/perl/5.8/warnings.pm
  732​: /usr/share/perl/5.8/warnings/register.pm
  101​: Bar.pm
  101​: Foo.pm
  63​: Once.pm
  64​: Twice.pm

I don't know why my file sizes were so different on my Perl 5.8.8
installation. This looks more like Rick Delaney's output, but with
different behaviour.

--
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.
 

@p5pRT
Copy link
Author

p5pRT commented Apr 29, 2008

From p5p@spam.wizbit.be

On Wed Apr 18 09​:17​:31 2007, colinr wrote​:

Getting bounces if I send with perlbug, but that may be due to our
mail
server configuration, so retrying manually​:

This is a bug report for perl from colin.robertson@​bbc.co.uk,
generated with the help of perlbug 1.35 running under perl v5.8.8.

There is an odd inconsistency in the behaviour of Exporter and the
points at which it warns about redefining subroutines.

Can you run the following command if the problem still exists​:

perl -wle 'for (qw/Carp Exporter base strict warnings
warnings​::register/) { eval "require $_"; if ($@​) { print "Unable to
require $_​: $@​"; } print "$_ = " . ${"$_\​::VERSION"} }'

Or can you tar the files and attach them?

Kind regards,

Bram

@p5pRT
Copy link
Author

p5pRT commented Apr 29, 2008

p5p@spam.wizbit.be - Status changed from 'open' to 'stalled'

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2016

From @dcollinsn

dcollins@​nightshade64​:~/toolchain/42601$ perl5.25.2 -we 'use Once;'
Subroutine Once​::foobar redefined at /home/dcollins/toolchain/perl5/perls/perl-5.25.2/lib/5.25.2/Exporter.pm line 66.
at Once.pm line 4.

dcollins@​nightshade64​:~/toolchain/42601$ perl5.8.8 -we "use Once;" 2>&1
Subroutine Once​::foobar redefined at /home/dcollins/toolchain/perl5/perls/perl-5.8.8/lib/5.8.8/Exporter.pm line 65.
at Once.pm line 4

--
Respectfully,
Dan Collins

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2016

The RT System itself - Status changed from 'stalled' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 16, 2016

@dcollinsn - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant