| 1 | # test merging of anon subs from evals | ||
| 2 | |||
| 3 | 16 | my $code = qq{ sub { print "sub called\\n" } $Devel::NYTProf::StrEvalTestPad}; | |
| 4 | |||
| 5 | # call once from particular line | ||
| 6 | 16 | eval($code)->(); | |
| 7 | |||
| 8 | # call twice from the same line | ||
| 9 | 16 | eval($code)->(); eval($code)->(); | |
| 10 | |||
| 11 | # called from inside a string eval | ||
| 12 | 16 | eval q{ | |
| 13 | eval($code)->(); eval($code)->(); | ||
| 14 | }; |