summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorLeon Timmermans <fawaka@gmail.com>2013-05-15 23:04:03 +0200
committerLeon Timmermans <fawaka@gmail.com>2013-05-15 23:19:49 +0200
commit064fb7979931c2a2ac6711c9687db30bd89dcde8 (patch)
tree2b602d631a99a7d2486c601469a5c2f360095a89 /pod
parent610996fda2dae66f57562c2ae9ab5c005b8e0c69 (diff)
downloadperl-064fb7979931c2a2ac6711c9687db30bd89dcde8.tar.gz
Clarified perldelta entry for UID/GID magic variables
Diffstat (limited to 'pod')
-rw-r--r--pod/perldelta.pod17
1 files changed, 15 insertions, 2 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 2721a1ca85..4a21c4a621 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -763,8 +763,21 @@ active user.
Swapping of $< and $>
-For more information about this future deprecation, see L<the relevant RT
-ticket|https://rt.perl.org/rt3/Ticket/Display.html?id=96212>.
+Perl has supported the idiom of swapping $< and $> (and likewise $( and
+$)) to temporarily drop permissions since 5.0, like this:
+
+ ($<, $>) = ($>, $<);
+
+However, this idiom modifies the real user/group id, which can have
+undesirable side-effects, is no longer useful on any platform perl
+supports and complicates the implementation of these variables and list
+assignment in general.
+
+As an alternative, assignment only to C<< $> >> is recommended:
+
+ local $> = $<;
+
+See also: L<Setuid Demystified|http://www.cs.berkeley.edu/~daw/papers/setuid-usenix02.pdf>.
=item *