Front page | perl.perl5.porters |
Postings from September 2016
[perl #129345] perlmod doc bug wrt package scope
Thread Next
From:
perlbug-followup
Date:
September 24, 2016 21:42
Subject:
[perl #129345] perlmod doc bug wrt package scope
Message ID:
rt-4.0.24-23532-1474689799-1084.129345-75-0@perl.org
# New Ticket Created by
# Please include the string: [perl #129345]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=129345 >
This is a bug report for perl from andy@glew.net,
generated with the help of perlbug 1.39 running under perl 5.18.2.
-----------------------------------------------------------------
[Please describe your issue here]
See
http://stackoverflow.com/questions/39668903/multiple-package-statements-in-same-file-perlmod-doc-bug?noredirect=1#comment66641669_39668903
http://perldoc.perl.org/perlmod.html
The package statement declares the compilation unit as being in the
given namespace. The scope of the package declaration is from the
declaration itself through the end of the enclosing block, eval, or
file, whichever comes first (the same scope as the my() and local()
operators).
Does not mention that package scope ends at next package statement.
http://perldoc.perl.org/functions/package.html
All unqualified dynamic identifiers in this scope will be in the
given namespace, except where overridden by another package
declaration
(unless you guys want to take spercial pleading, and say that in the same
file
these are all in the same "package scop[E")
package Foo;
my $my_var='a';
package Bar;
# $my_var crosses from previous package
package Foo;
...nah - you would not do that, would you?)
Also, as you can see from the above, or from the test programs posted
http://stackoverflow.com/questions/39668903/multiple-package-statements-in-same-file-perlmod-doc-bug?noredirect=1#comment66641669_39668903
my() variable scopes cross package statement boundaries.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=docs
severity=low
---
Site configuration information for perl 5.18.2:
Configured by root at Tue Aug 11 04:03:09 PDT 2015.
Summary of my perl5 (revision 5 version 18 subversion 2) configuration:
Platform:
osname=darwin, osvers=15.0, archname=darwin-thread-multi-2level
uname='darwin osx219.apple.com 15.0 darwin kernel version 15.0.0: fri
may 22 22:03:51 pdt 2015; root:xnu-3216.0.0.1.11~1development_x86_64 x86_64
'
config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags=
-Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-arch i386 -arch x86_64 -g -pipe -fno-common
-DPERL_DARWIN -fno-strict-aliasing -fstack-protector',
optimize='-Os',
cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing
-fstack-protector'
ccversion='', gccversion='4.2.1 Compatible Apple LLVM 7.0.0
(clang-700.0.59.1)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc -mmacosx-version-min=10.11.3', ldflags ='-arch i386 -arch x86_64
-fstack-protector'
libpth=/usr/lib /usr/local/lib
libs=
perllibs=
libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-arch i386 -arch x86_64 -bundle -undefined
dynamic_lookup -fstack-protector'
Locally applied patches:
/Library/Perl/Updates/<version> comes before system perl directories
installprivlib and installarchlib points to the Updates directory
---
@INC for perl 5.18.2:
/Users/glew/perl5/lib/perl5/5.18.2/darwin-thread-multi-2level
/Users/glew/perl5/lib/perl5/5.18.2
/Users/glew/perl5/lib/perl5/darwin-thread-multi-2level
/Users/glew/perl5/lib/perl5
/Library/Perl/5.18/darwin-thread-multi-2level
/Library/Perl/5.18
/Network/Library/Perl/5.18/darwin-thread-multi-2level
/Network/Library/Perl/5.18
/Library/Perl/Updates/5.18.2
/System/Library/Perl/5.18/darwin-thread-multi-2level
/System/Library/Perl/5.18
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.18
.
---
Environment for perl 5.18.2:
DYLD_LIBRARY_PATH (unset)
HOME=/Users/glew
LANG=C
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/Users/glew/perl5/bin:/Users/glew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
PERL5LIB=/Users/glew/perl5/lib/perl5
PERL_BADLANG (unset)
PERL_LOCAL_LIB_ROOT=/Users/glew/perl5
PERL_MB_OPT=--install_base "/Users/glew/perl5"
PERL_MM_OPT=INSTALL_BASE=/Users/glew/perl5
SHELL=/bin/bash
You have finished composing your message. At this point, you have
a few options. You can:
* [Se]nd the message to perlbug@perl.org,
* [D]isplay the message on the screen,
* [R]e-edit the message
* Display or change the message's [su]bject
* Save the message to a [f]ile to mail at another time
* [Q]uit without sending a message
Thread Next
-
[perl #129345] perlmod doc bug wrt package scope
by perlbug-followup