summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-06-22 13:38:11 +0100
committerNicholas Clark <nick@ccl4.org>2010-06-22 13:38:11 +0100
commitfca02b3118d762ef634915ba3c68eddbf818a2b6 (patch)
tree41e2b8da451a4dc5cbcac5d9c9152dbe823fe289
parent958e98f0d5b0ac49e048e0f734715af7f86d3bd7 (diff)
downloadperl-fca02b3118d762ef634915ba3c68eddbf818a2b6.tar.gz
Clarify the entry for "Stashes are now always defined".
-rw-r--r--pod/perl5132delta.pod16
1 files changed, 14 insertions, 2 deletions
diff --git a/pod/perl5132delta.pod b/pod/perl5132delta.pod
index 56cce9e749..eaaca090cf 100644
--- a/pod/perl5132delta.pod
+++ b/pod/perl5132delta.pod
@@ -33,8 +33,20 @@ this change (c1bd23).
=head2 Stashes are now always defined
-%stash:: is now autovivified so 'defined %Foo::' always returns true
-- although calling defined on a stash is now deprecated.
+C<defined %Foo::> now always returns true, even when no symbols have yet been
+defined in that package.
+
+This is a side effect of removing a special case kludge in the tokeniser,
+added for 5.10.0, to hide side effects of changes to the internal storage of
+hashes that to drastically reduce their memory usage overhead.
+
+Calling defined on a stash has been deprecated since 5.6.0, warned on
+lexicals since 5.6.0, and has warned for stashes (and other package
+variables) since 5.12.0. C<defined %hash> has always exposed an
+implementation detail - emptying a hash by deleting all entries from it does
+not make C<defined %hash> false, hence C<defined %hash> is not valid code to
+determine whether an arbitrary hash is empty. Instead, use the behaviour
+that an empty <%hash> always returns false in a scalar context.
=head1 Core Enhancements