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

[perl #20536] use if 1, open => ':utf8' fails

Thread Next
From:
Autrijus Tang
Date:
January 24, 2003 14:45
Subject:
[perl #20536] use if 1, open => ':utf8' fails
Message ID:
rt-20536-49670.13.2464320257255@bugs6.perl.org
# New Ticket Created by  Autrijus Tang 
# Please include the string:  [perl #20536]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=20536 >


This is a bug report for perl from autrijus@autrijus.org,
generated with the help of perlbug 1.34 running under perl v5.8.0.


-----------------------------------------------------------------
[Please enter your report here]

$ perl -Mif=1,open,:utf8
Not enough arguments for open at (eval 1) line 2, at EOF
        ...propagated at /usr/local/lib/perl5/5.8.0/if.pm line 10.
BEGIN failed--compilation aborted.

The following patch "corrects" this behaviour by manually translating it.

btw, if.pm on CPAN isn't "corified" yet -- it still installs to sitelib.

--- if.pm.orig  Sat Jan 25 06:15:30 2003
+++ if.pm       Sat Jan 25 06:16:03 2003
@@ -6,7 +6,9 @@
   my $method = shift() ? 'import' : 'unimport';
   return unless shift;         # CONDITION
   my $p = shift;               # PACKAGE
-  eval "require $p" or die;    # Adds .pm etc if needed
+  my $f = $p;
+  $f =~ s!::!/!g;
+  eval "require '$f.pm'" or die;       # Adds .pm etc if needed
   $p->$method(@_) if $p->can($method);
 }


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl v5.8.0:

Configured by autrijus at Mon Jan 20 07:31:27 CST 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=freebsd, osvers=freebsd, archname=i386-freebsd
    uname='freebsd 5.0-release freebsd 5.0-release #0: thu jan 16 22:16:53 gmt 2003 root@hollin.btc.adaptec.com:usrobjusrsrcsysgeneric i386 '
    config_args=''
    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=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include',
    optimize='-O',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.2.1 [FreeBSD] 20021119 (release)', 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='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lgdbm -ldb -lm -lc -lcrypt -lutil
    perllibs=-lm -lc -lcrypt -lutil
    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:
    MAINT18448

---
@INC for perl v5.8.0:
    /usr/local/lib/perl5/5.8.0/i386-freebsd
    /usr/local/lib/perl5/5.8.0
    /usr/local/lib/perl5/site_perl/5.8.0/i386-freebsd
    /usr/local/lib/perl5/site_perl/5.8.0
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.8.0:
    HOME=/home/autrijus
    LANG (unset)
    LANGUAGE (unset)
    LC_CTYPE=zh_TW.Big5
    LD_LIBRARY_PATH=/usr/local/lib
    LOGDIR (unset)
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/autrijus/bin
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/psh


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