diff options
author | Robin Houston <robin@cpan.org> | 2001-07-10 14:33:40 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-07-10 13:45:12 +0000 |
commit | f2c0fa378e55ca42d398c29e02f5dc2fd742d1dc (patch) | |
tree | f730cee0155cdee2df432a1555b03eae220f1220 /pod | |
parent | 3c01495985c7c4b8f1b95ec88b49209869fdb517 (diff) | |
download | perl-f2c0fa378e55ca42d398c29e02f5dc2fd742d1dc.tar.gz |
deprecate package with no arguments
Message-ID: <20010710133340.A13452@robin.kitsite.com>
p4raw-id: //depot/perl@11256
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perldiag.pod | 7 | ||||
-rw-r--r-- | pod/perlfunc.pod | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index c754333040..65cde01c35 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -3868,6 +3868,13 @@ In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);> you should remove AutoLoader from @ISA and change C<use AutoLoader;> to C<use AutoLoader 'AUTOLOAD';>. +=item Use of "package" with no arguments is deprecated + +(D deprecated) You used the C<package> keyword without specifying a package +name. So no namespace is current at all. Using this can cause many +otherwise reasonable constructs to fail in baffling ways. C<use strict;> +instead. + =item Use of %s in printf format not supported (F) You attempted to use a feature of printf that is accessible from diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 1039cd0caa..6deeadb622 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3404,8 +3404,10 @@ C<$::sail> is equivalent to C<$main::sail> (as well as to C<$main'sail>, still seen in older code). If NAMESPACE is omitted, then there is no current package, and all -identifiers must be fully qualified or lexicals. This is stricter -than C<use strict>, since it also extends to function names. +identifiers must be fully qualified or lexicals. However, you are +strongly advised not to make use of this feature. Its use can cause +unexpected behaviour, even crashing some versions of Perl. It is +deprecated, and will be removed from a future release. See L<perlmod/"Packages"> for more information about packages, modules, and classes. See L<perlsub> for other scoping issues. |