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

[perl #33978] pod update for

Thread Next
ben @ zaeon . com
January 28, 2005 15:09
[perl #33978] pod update for
Message ID:
# New Ticket Created by 
# Please include the string:  [perl #33978]
# in the subject line of all future correspondence about this issue. 
# <URL: >

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

[Please enter your report here]

Hi, I thought this might be a helpful tip to add to the documentation
of  It saves the hassle of maintaining both the definition
of a large set of constants and a separate list for export (or whatever).

--- /usr/lib/perl5/5.8.4/	2004-10-07 14:23:19.000000000 -0500
+++	2005-01-28 16:37:59.000000000 -0600
@@ -261,6 +261,18 @@
         NEGMASK => ~BITMASK,                    # Error!
+It can sometimes be useful to keep track of the names of your 
+constants, especially when you want to export all of the constants
+defined in a module.  You can't pass a variable to use constant, 
+but by assigning the hashref in passing, you can make use of it.
+    my $constants; 
+    use contant $constants = {
+		FOO => 'first',
+		BAR => 'last',
+	};
+    @EXPORT = keys %$constants;
 =head2 Magic constants
 Magical values and references can be made into constants at compile

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

Configured by Gentoo at Thu Oct  7 14:06:20 CDT 2004.

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
    osname=linux, osvers=2.4.22-gentoo-r2, archname=i686-linux
    uname='linux 2.4.22-gentoo-r2 #3 mon jan 5 06:59:15 cst 2004 i686 pentium iii (coppermine) genuineintel gnulinux '
    config_args='-des -Darchname=i686-linux -Dcccdlflags=-fPIC -Dccdlflags=-rdynamic -Dcc=gcc -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr -Dlocincpth=  -Doptimize=-march=pentium3 -O3 -pipe -fomit-frame-pointer -fforce-addr -falign-functions=4 -fprefetch-loop-arrays -Duselargefiles -Dd_semctl_semun -Dscriptdir=/usr/bin -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dinstallman1dir=/usr/share/man/man1 -Dinstallman3dir=/var/tmp/portage/perl-5.8.4-r1/image//usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dcf_by=Gentoo -Ud_csh -Di_ndbm -Di_gdbm -Di_db'
    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
    cc='gcc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-march=pentium3 -O3 -pipe -fomit-frame-pointer -fforce-addr -falign-functions=4 -fprefetch-loop-arrays',
    cppflags='-DPERL5 -fno-strict-aliasing'
    ccversion='', gccversion='3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)', 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='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lpthread -lnsl -lndbm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -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.8.4:

Environment for perl v5.8.4:
    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