develooper Front page | perl.perl5.porters | Postings from June 2001

[ID 20010601.004] do() is such a broken function

Thread Next
From:
jpinyan
Date:
June 1, 2001 11:11
Subject:
[ID 20010601.004] do() is such a broken function
Message ID:
200106011810.OAA02866@sushi.riskgrades.com
This is a bug report for perl from japhy@pobox.com,
generated with the help of perlbug 1.28 running under perl v5.6.0.


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

The do() function has so much expected of it, it sometimes doesn't know 
what to... err... do.

  perl -e 'do print()'
  Undefined subroutine &main::print called at -e line 1.

  perl -e 'do(print())'
  Perl v49.0.0 required--this is only v5.6.0, stopped at -e line 1.

  perl -e 'do +print()'
  Perl v49.0.0 required--this is only v5.6.0, stopped at -e line 1.

  perl -e 'do 5.8'
  Perl v5.800.0 required--this is only v5.6.0, stopped (did you mean 
  v5.8.0?) at -e line 1.

  perl -e 'do v5.8.0'
  syntax error at -e line 1, near "do v5.8.0"
  Execution of -e aborted due to compilation errors.

  perl -e 'do 5.8.0; print $!'
  No such file or directory

Those Perl version errors are do^Wue to do() being a stripped-down 
require() -- replace 'do' with 'require' in those above which complained 
about version numbers, and the output is sometimes better:

  perl -e 'require print()'
  Perl v49.0.932864 required--this is only v5.6.0, stopped at -e line 1.

  perl -e 'require 5.8'
  Perl v5.800.0 required--this is only v5.6.0, stopped (did you mean 
  v5.8.0?) at -e line 1.

  perl -e 'require v5.8.0'
  Perl v5.8.0 required--this is only v5.6.0, stopped at -e line 1.

  perl -e 'require 5.8.0'
  Perl v5.8.0 required--this is only v5.6.0, stopped at -e line 1.

This is just bizarre.  I think there's an implicit ord(1) happening in 
there somewhere, and it's getting all floating-point-y on me.

This was instigated by the upcoming patch to File::Find.

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

Configured by root at Tue Feb  6 18:31:14 EST 2001.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.7, archname=sun4-solaris
    uname='sunos sushi 5.7 generic_106541-14 sun4u sparc sunw,ultra-60 '
    config_args='-Dcc=gcc -Doptimize=-O2'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=undef 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='gcc', optimize='-O2', gccversion=2.95.2 19991024 (release)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lsec
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.6.0:
    /export/home/jpinyan/lib
    /usr/local/lib/perl5/5.6.0/sun4-solaris
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.6.0:
    HOME=/export/home/jpinyan
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/local/oracle/lib
    LOGDIR (unset)
    PATH=/usr/local/bin:/usr/openwin/bin:/usr/bin:/usr/local/oracle/bin:.:/export/home/jpinyan/bin
    PERL5LIB=/export/home/jpinyan/lib
    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