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

[perl #24384] 21418 (UNIVERSAL.pm patch) breaks autouse.pm

Thread Next
From:
Slaven Rezic
Date:
November 1, 2003 09:10
Subject:
[perl #24384] 21418 (UNIVERSAL.pm patch) breaks autouse.pm
Message ID:
rt-24384-66915.14.7687317713606@rt.perl.org
# New Ticket Created by  Slaven Rezic 
# Please include the string:  [perl #24384]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24384 >



This is a bug report for perl from slaven.rezic@berlin.de,
generated with the help of perlbug 1.34 running under perl v5.8.2.


-----------------------------------------------------------------
The patch 21418 (now not anymore in perl 5.8.2, but still in
bleadperl) breaks some usages of autouse.pm.

Try it with following files:

# Bla.pm: ##########################################
package Bla;
sub foo { warn "foo" }
1;
__END__

# bla.pl: ##########################################
#!perl -x
use UNIVERSAL;
use autouse Bla => "foo";
foo();
__END__

$ perl5.8.2d bla.pl
autoused module has unique import() method at bla.pl line 18

It seems that it will break autouse on every module
not using Exporter.

I see the following solutions:

* Do not apply 21418, but rather deprecate using
  use UNIVERSAL

* Fix autouse.pm to not croak if a module uses UNIVESAL::import

* Implement use UNIVERSAL (...) as a special case in the perl
  core.

Regards,
	Slaven

-----------------------------------------------------------------
---
Flags:
    category=library
    severity=medium
---
Site configuration information for perl v5.8.2:

Configured by eserte at Tue Oct 28 20:07:12 CET 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 2 patch 21562) configuration:
  Platform:
    osname=freebsd, osvers=4.6-stable, archname=i386-freebsd
    uname='freebsd vran.herceg.de 4.6-stable freebsd 4.6-stable #15: sat jul 27 09:32:28 cest 2002 root@vran.herceg.de:usrlocalsrcfreebsd-4srcsyscompilevran i386 '
    config_args='-Doptimize=-g -DPERL_DEBUGGING_MSTATS -Dusemymalloc=y -Dprefix=/usr/perl5.8.2d -D cc=ccache cc -Dgccansipedantic -Duse64bit -de -D hintfile=myfreebsd'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=y, bincompat5005=undef
  Compiler:
    cc='ccache cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -I/usr/local/include',
    optimize='-g -DPERL_DEBUGGING_MSTATS',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.4 20020320 [FreeBSD]', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='ccache cc', ldflags ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lgdbm -ldb -lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fpic', lddlflags='-shared  -L/usr/local/lib'

Locally applied patches:
    RC1

---
@INC for perl v5.8.2:
    /usr/perl5.8.2d/lib/5.8.2/i386-freebsd
    /usr/perl5.8.2d/lib/5.8.2
    /usr/perl5.8.2d/lib/site_perl/5.8.2/i386-freebsd
    /usr/perl5.8.2d/lib/site_perl/5.8.2
    /usr/perl5.8.2d/lib/site_perl
    .

---
Environment for perl v5.8.2:
    HOME=/home/e/eserte
    LANG (unset)
    LANGUAGE (unset)
    LC_ALL=de_DE.ISO8859-1
    LC_CTYPE=de_DE.ISO8859-1
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/X11R6/bin:/usr/X11/bin:/usr/perl5.8.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/gnu/bin:/usr/TeX/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/pilot/bin:/home/e/eserte/bin/FreeBSD:/home/e/eserte/bin/sh:/home/e/eserte/bin:/usr/X386/bin:/usr/games:/home/e/eserte/devel
    PERL5_CPANPLUS_CONFIG=/home/e/eserte/.cpanplus/config
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh


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