This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug #41550 - AUTOLOAD :lvalue not working the same in blead as in
[perl5.git]
/
t
/
op
/
sub_lval.t
diff --git
a/t/op/sub_lval.t
b/t/op/sub_lval.t
index
2e4db52
..
a159bac
100755
(executable)
--- a/
t/op/sub_lval.t
+++ b/
t/op/sub_lval.t
@@
-3,7
+3,7
@@
BEGIN {
@INC = '../lib';
require './test.pl';
}
@INC = '../lib';
require './test.pl';
}
-plan tests=>6
8
;
+plan tests=>6
9
;
sub a : lvalue { my $a = 34; ${\(bless \$a)} } # Return a temporary
sub b : lvalue { ${\shift} }
sub a : lvalue { my $a = 34; ${\(bless \$a)} } # Return a temporary
sub b : lvalue { ${\shift} }
@@
-539,3
+539,14
@@
TODO: {
is($line, "zeroonetwothree");
}
is($line, "zeroonetwothree");
}
+
+{
+ package Foo;
+ sub AUTOLOAD :lvalue { *{$AUTOLOAD} };
+ package main;
+ my $foo = bless {},"Foo";
+ my $result;
+ $foo->bar = sub { $result = "bar" };
+ $foo->bar;
+ is ($result, 'bar', "RT #41550");
+}