Re: [perl #57080] Problem in Exporter
by Anno Siegel other posts by this author
Jul 20 2008 10:36AM messages near this date
Re: [perl #57080] Problem in Exporter
|
Every.pm on CPAN
On 20.07.2008, at 18:44, Adriano Ferreira via RT wrote:
> On Fri, Jul 18, 2008 at 1:29 PM, via RT Anno Siegel
> <perlbug-followup@[...].org> wrote:
> > # New Ticket Created by Anno Siegel
> > # Please include the string: [perl #57080]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57080 >
> >
> >
> > This is a bug report for perl from anno@[...].de,
> > generated with the help of perlbug 1.36 running under perl 5.10.0.
> >
> > I believe there is a small bug in Exporter.pm that can lead to error
> > messages from Exporter being mis-attributed (as in file and line) by
> > Carp. The error is reported as coming from Exporter, not the place
>
> Thanks for reporting this.
Purely coincidental. The condition made a couple of tests fail in a
module of mine.
> I don't think that's really a bug in Exporter. I think it's more like
> a bug at the older Carp module (because I think Carp owes that to
> Exporter when it depends on it). But as long as Exporter historically
> took care of that, I think the fix is the right one.
Yes, it's ultimately a problem in (older versions of) Carp, and the
cross-module
action it requires in Exporter is unfortunate.
> If Carp gets
> dual-lifed in the future, maybe we can get rid of that code again by
> pushing the dependency on Carp to a higher version.
Sounds like a plan :)
> So that patch was absorbed into Exporter 5.63 (in its way to CPAN) and
> the corresponding patch to bleadperl is coming at another message to
> p5p.
Thank you,
Anno
> > -------------Text of patch for viewing---------------
> > --- lib/Exporter_orig.pm 2007-12-11 10:39:58.000000000 +0100
> > +++ lib/Exporter.pm 2008-07-15 17:30:26.000000000 +0200
> > @@ -11,8 +11,9 @@ our $ExportLevel = 0;
> > our $Verbose ||= 0;
> > our $VERSION = '5.62';
> > our (%Cache);
> > -# Carp does this now for us, so we can finally live w/o Carp
> > -#$Carp::Internal{Exporter} = 1;
> > +# Carp does this now for us, but we may be running with an old Carp
> > +$Carp::Internal{Exporter} = 1;
> > +$Carp::Internal{'Exporter::Heavy'} = 1;
> >
> > sub as_heavy {
> > require Exporter::Heavy;
> > --- lib/Exporter/Heavy_orig.pm 2007-03-09 20:27:01.000000000 +0100
> > +++ lib/Exporter/Heavy.pm 2008-07-15 17:31:11.000000000 +0200
> > @@ -5,8 +5,10 @@ no strict 'refs';
> >
> > # On one line so MakeMaker will see it.
> > require Exporter; our $VERSION = $Exporter::VERSION;
> > -# Carp does this now for us, so we can finally live w/o Carp
> > -#$Carp::Internal{"Exporter::Heavy"} = 1;
> > +
> > +# Carp does this now for us, but we may be running with an old Carp
> > +$Carp::Internal{Exporter} = 1;
> > +$Carp::Internal{'Exporter::Heavy'} = 1;
> >
> > =head1 NAME
> >
> > --- lib/Exporter_orig.t 2007-03-09 21:54:09.000000000 +0100
> > +++ lib/Exporter.t 2008-07-15 17:33:20.000000000 +0200
> > @@ -25,7 +25,7 @@ sub ok ($;$) {
> >
> > BEGIN {
> > $test = 1;
> > - print "1..28\n";
> > + print "1..30\n";
> > require Exporter;
> > ok( 1, 'Exporter compiled' );
> > }
> > @@ -218,3 +218,7 @@ The::Import->import;
> > my $val = eval { wibble() };
> > ::ok($val eq "wobble", "exported importer worked");
> >
> > +# Check if we're running with a sufficiently new Carp
> > +require Carp::Heavy;
> > +::ok($Carp::Internal{Exporter}, "Carp recognizes Exporter");
> > +::ok($Carp::Internal{'Exporter::Heavy'}, "Carp recognizes
> > Exporter::Heavy");
> >
> > ---
> > Flags:
> > category=library
> > severity=low
> > ---
> > Site configuration information for perl 5.10.0:
> >
> > Configured by anno at Sat Dec 22 23:12:30 CET 2007.
> >
> > Summary of my perl5 (revision 5 version 10 subversion 0)
> > configuration:
> > Platform:
> > osname=darwin, osvers=8.11.0, archname=darwin-thread-multi-2level
> > uname='darwin oliva 8.11.0 darwin kernel version 8.11.0: wed oct
> > 10 18:26:00 pdt 2007; root:xnu-792.24.17~1release_ppc power macintosh
> > powerpc '
> > config_args='-des -Dusethreads'
> > hint=recommended, useposix=true, d_sigaction=define
> > 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 ='-fno-common -DPERL_DARWIN -no-cpp-precomp -
> > fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include',
> > optimize='-O3',
> > cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-
> > precomp -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/
> > include'
> > ccversion='', gccversion='4.0.0 20041026 (Apple Computer, Inc.
> > build 4061)', gccosandvers='darwin8'
> > 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='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/
> > local/lib -L/opt/local/lib'
> > libpth=/usr/local/lib /opt/local/lib /usr/lib
> > libs=-ldbm -ldl -lm -lc
> > perllibs=-ldl -lm -lc
> > libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false,
> > libperl=libperl.a
> > gnulibc_version=''
> > Dynamic Linking:
> > dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
> > cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/
> > usr/local/lib -L/opt/local/lib'
> >
> > Locally applied patches:
> >
> >
> > ---
> > @INC for perl 5.10.0:
> > /Users/anno/lib/perl
> > /usr/local/lib/perl5/5.10.0/darwin-thread-multi-2level
> > /usr/local/lib/perl5/5.10.0
> > /usr/local/lib/perl5/site_perl/5.10.0/darwin-thread-multi-2level
> > /usr/local/lib/perl5/site_perl/5.10.0
> > /usr/local/lib/perl5/site_perl/5.8.8
> > /usr/local/lib/perl5/site_perl/5.8.7
> > /usr/local/lib/perl5/site_perl/5.8.6
> > /usr/local/lib/perl5/site_perl/5.8.5
> > /usr/local/lib/perl5/site_perl/5.8.4
> > /usr/local/lib/perl5/site_perl/5.8.3
> > /usr/local/lib/perl5/site_perl/5.8.1
> > /usr/local/lib/perl5/site_perl/5.005
> > /usr/local/lib/perl5/site_perl
> > .
> >
> > ---
> > Environment for perl 5.10.0:
> > DYLD_LIBRARY_PATH (unset)
> > HOME=/Users/anno
> > LANG (unset)
> > LANGUAGE (unset)
> > LC_CTYPE=de_DE.ISO8859-1
> > LD_LIBRARY_PATH (unset)
> > LOGDIR (unset)
> > PATH=/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/Users/anno/
> > bin:/Developer/Tools:/opt/local/bin
> > PERL5LIB=/Users/anno/lib/perl
> > PERL_BADLANG (unset)
> > PERL_MODULE=InsideOut
> > SHELL=/bin/tcsh
> >
> >
> >
>
>
Thread:
Anno Siegel
Adriano Ferreira
Anno Siegel
|