Created
February 5, 2012 16:22
-
-
Save robinhouston/1746349 to your computer and use it in GitHub Desktop.
lvalue subroutine behaviour changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In days of yore, this would print ONCE UPON A TIME. | |
# In bleadperl, it prints BUT NOWADAYS | |
# | |
# Can anyone point me to what has changed? | |
use strict; use feature 'say'; | |
my $x = "ONCE UPON A TIME"; | |
sub foo :lvalue { $x; } | |
my $r = \(scalar foo()); | |
$$r = "BUT NOWADAYS"; | |
say $x; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment