This is an automatically generated mail to inform you that tests are now available in t/spec/S02-names_and_variables/varnames.t
commit 2079135f0c3fc502685dd42c6e7ab6997166508a Author: moritz <mor...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Sun May 30 15:14:14 2010 +0000 [t/spec] tests for RT #69596, aliasing $0 into custom match objects git-svn-id: http://svn.pugscode.org/p...@30997 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S02-names_and_variables/varnames.t b/t/spec/S02-names_and_variables/varnames.t index ff097d2..a05852c 100644 --- a/t/spec/S02-names_and_variables/varnames.t +++ b/t/spec/S02-names_and_variables/varnames.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 6; +plan 8; # L<S02/Names and Variables/special variables of Perl 5 are going away> @@ -16,5 +16,16 @@ eval_lives_ok 'my proto $/', 'as can $/'; eval_dies_ok 'my $f!ao = "beh";', "normal varnames can't have ! in their name"; eval_dies_ok 'my $fo:o::b:ar = "bla"', "var names can't have colons in their names either"; +{ + class MyMatch { + method postcircumfix:<[ ]>($x) { + "foo$x"; + } + } + $/ = MyMatch.new; + is $0, 'foo0', 'Aliasing of $0 into $/ (1)'; + is $4, 'foo4', 'Aliasing of $0 into $/ (2)'; +} + # vim: ft=perl6