develooper Front page | perl.perl5.porters | Postings from April 2000

[ID 20000415.005] perlsub (Constant functions) suggest use ofdeprecated $]

Thread Next
David Dyck
April 15, 2000 11:42
[ID 20000415.005] perlsub (Constant functions) suggest use ofdeprecated $]
Message ID:

This is a bug report for perl from,
generated with the help of perlbug 1.28 running under perl v5.6.0.

[Please enter your report here]

The documentation in perlvar.pod for the perl variable $], states:
 "The use of this variable is deprecated."

But in perlsub/"Constant Functions" a method of thwarting
the inlining mechanism while preserving the prototype
is suggested using $];

    sub not_inlined () {
        23 if $];

I think this is inconsistent.

Could someone please suggest a 'better' example for  
perlsub/"Constant Functions" to use here.

  David Dyck

I came across this while working with some code like 
the following perl code which prints the following diagnostics.

use diagnostics;
sub d() { return "one\n"; }
undef &d;

Constant subroutine d undefined at line 4 (#1)
    (W misc) You undefined a subroutine which had previously been eligible for
    inlining.  See perlsub/"Constant Functions" for commentary and

[Please do not change anything below this line]
Site configuration information for perl v5.6.0:

Configured by dcd at Thu Mar 23 14:52:39 PST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
    osname=linux, osvers=2.3.99-pre3, archname=i686-linux
    uname='linux dd 2.3.99-pre3 #1 wed mar 22 10:40:34 pst 2000 i686 '
    config_args='-Doptimize=-O3 -g -de'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
    cc='cc', optimize='-O3 -g', gccversion=
    cppflags='-DDEBUGGING -I/usr/local/include'
    ccflags ='-DDEBUGGING -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -ldbm -ldb -ldl -lm -lc
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.6.0:

Environment for perl v5.6.0:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About