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

[perl #24483] =cut toggles POD/code compilation rather than forcing code

Thread Next
From:
perlbug-followup
Date:
November 12, 2003 21:20
Subject:
[perl #24483] =cut toggles POD/code compilation rather than forcing code
Message ID:
rt-24483-67388.1.59891509017676@rt.perl.org
# New Ticket Created by  zowie@terpsichore.boulder.swri.edu 
# Please include the string:  [perl #24483]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24483 >



This is a bug report for perl from zowie@terpsichore.boulder.swri.edu,
generated with the help of perlbug 1.34 running under perl v5.8.0.


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

The "=cut" POD directive appears to act as a toggle between POD and 
code mode for compilation.  Hence, a lone "=cut" line causes subsequent
code to be ignored up to the next POD section.  For example, the 
construct:

----------===clip here===----------

=cut

sub one { print "One\n"; }

=head2 Some documentation

=cut

sub two { print "Two\n"; }

&two; 
&one;

----------===clip here===----------

causes "Two\nUndefined subroutine &main::one called at foo.pl line 13"
to be printed.

Placing a "=head2 foo" line at the top changes the output to
the more desirable  "Two\nOne\n".



A lone `=cut' should probably either be ignored or cause a warning
to be emitted.


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

Configured by zowie at Mon May  5 13:46:02 MDT 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.4.20-6bigmem, archname=i686-linux-64all-ld
    uname='linux terpsichore.boulder.swri.edu 2.4.20-6bigmem #8 smp sun may 4 23:20:40 mdt 2003 i686 athlon i386 gnulinux '
    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=define use64bitall=undef uselongdouble=define
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O3',
    cppflags='-fno-strict-aliasing -I/usr/include/gdbm'
    ccversion='', gccversion='3.2.2 20030222 (Red Hat Linux 3.2.2-5)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.2'
  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.0:
    /usr/lib/perl5/5.8.0/i686-linux-64all-ld
    /usr/lib/perl5/5.8.0
    /usr/local/lib/perl5/site_perl/5.8.0/i686-linux-64all-ld
    /usr/local/lib/perl5/site_perl/5.8.0
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.8.0:
    HOME=/home/zowie
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/zowie/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/ssh-1.2.26/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/home/zowie/lib/Office51/bin:/usr/local/Geomview/bin:.
    PERLDL_STARTUP=/home/zowie/PDL/perldl_startup.pl
    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