This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert the last third of t/op/closure.t to test.pl
closure.t's test function has a prototype of &, so all the blocks passed to it
may well be closures themselves, albeit simple ones over the outer lexicals of
the test script. However all of the tests are explicitly testing other
closures, systematically building up from these most simple behaviours, so
this is a side effect of the implementation, and removing it is not going to
leave particular behaviours untested. It may actually make the test more
robust, as particular closure bugs accidentally introduced will only cause
their tests to fail, instead of having the side effect of causing seemingly
unrelated tests to fail too.