diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-10-11 14:07:44 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-11 14:20:33 -0700 |
commit | f7bc00eab34ee7a152e6156203f7f3ed0a777194 (patch) | |
tree | 440b32341fe35e0e2666bc4022db3ed9e6eecb19 /t/op/sort.t | |
parent | 164df45ab853a1e9c2571d08edd3e27eae41a821 (diff) | |
download | perl-f7bc00eab34ee7a152e6156203f7f3ed0a777194.tar.gz |
[perl #30661] autoload sort subs
Diffstat (limited to 't/op/sort.t')
-rw-r--r-- | t/op/sort.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/t/op/sort.t b/t/op/sort.t index 73773b217a..2ab0cf5305 100644 --- a/t/op/sort.t +++ b/t/op/sort.t @@ -6,7 +6,7 @@ BEGIN { require 'test.pl'; } use warnings; -plan( tests => 162 ); +plan( tests => 165 ); # these shouldn't hang { @@ -938,3 +938,14 @@ fresh_perl_is like $output, qr/^(?:Win)+\z/, 'Match vars do not leak from one $$ sort sub to the next'; } + +# [perl #30661] autoloading +AUTOLOAD { $b <=> $a } +sub stubbedsub; +is join("", sort stubbedsub split//, '04381091'), '98431100', + 'stubborn AUTOLOAD'; +is join("", sort hopefullynonexistent split//, '04381091'), '98431100', + 'AUTOLOAD without stub'; +my $stubref = \&givemeastub; +is join("", sort $stubref split//, '04381091'), '98431100', + 'AUTOLOAD with stubref'; |