develooper Front page | perl.perl5.porters | Postings from November 1999

[ID 19991112.002] patch: not reporting path

JD Laub
November 12, 1999 07:58
[ID 19991112.002] patch: not reporting path
Message ID:

This is a bug report for perl from,
generated with the help of perlbug 1.26 running under perl 5.00503.


The Exporter does not report a pathname if the module name contains '::'.
Here are two examples; the first works fine, the 2nd shows the problem:

	% perl -MCwd=99 -e0
	Cwd 99 required--this is only version 2.01 (/ora2/jdl/PERL/dest/lib/perl5/5.00503/ at -e line 0

    % perl -MData::Dumper=99 -e0
    Data::Dumper 99 required--this is only version 2.101 at -e line 0
    BEGIN failed--compilation aborted.

What I would expect for the latter:

    % perl -MData::Dumper=99 -e0
    Data::Dumper 99 required--this is only version 2.101 (/ora2/jdl/PERL/dest/lib/perl5/5.00503/Data/ at -e line 0
    BEGIN failed--compilation aborted.

Here's the patch to fix it.  It's been tested against hpux & win32.

***	Sat Dec 12 10:28:58 1998
---	Fri Nov 12 08:36:26 1999
*** 217,223 ****
      my $version = ${"${pkg}::VERSION"};
      if (!$version or $version < $wanted) {
  	$version ||= "(undef)";
! 	my $file = $INC{"$"};
  	$file &&= " ($file)";
  	require Carp;
  	Carp::croak("$pkg $wanted required--this is only version $version$file")
--- 217,224 ----
      my $version = ${"${pkg}::VERSION"};
      if (!$version or $version < $wanted) {
  	$version ||= "(undef)";
! 	    # %INC contains slashes, but $pkg contains double-colons.
! 	my $file = (map {s,::,/,g; $INC{$_}} "$")[0];
  	$file &&= " ($file)";
  	require Carp;
  	Carp::croak("$pkg $wanted required--this is only version $version$file")



Site configuration information for perl 5.00503:

Configured by jdl at Fri Nov 12 08:20:36 MST 1999.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
    osname=hpux, osvers=10.20, archname=PA-RISC1.1
    uname='hp-ux mocha b.10.20 e 9000869 433596371 8-user license '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    cc='gcc', optimize='-O', gccversion=
    cppflags='-D_HPUX_SOURCE -I/usr/local/include'
    ccflags ='-D_HPUX_SOURCE -I/usr/local/include'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib/pa1.1 /lib /usr/lib /usr/ccs/lib
    libs=-lnsl_s -lndbm -ldld -lm -lc -lndir -lcrypt
    libc=/lib/, so=sl, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred '
    cccdlflags='-fpic', lddlflags='-b -L/usr/local/lib'

Locally applied patches:

@INC for perl 5.00503:

Environment for perl 5.00503:
    LANG (unset)
    LANGUAGE (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/home/jdl/bin.mocha/zsh Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About