This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
closure.t: load test.pl at BEGIN time
authorFather Chrysostomos <sprout@cpan.org>
Wed, 20 Jun 2012 21:25:19 +0000 (14:25 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 20 Jun 2012 22:54:05 +0000 (15:54 -0700)
This allows parentheses to be omitted.

t/op/closure.t

index 322b592..a241d91 100644 (file)
@@ -9,10 +9,10 @@
 BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
+    require './test.pl';
 }
 
 use Config;
-require './test.pl';
 
 my $i = 1;
 sub foo { $i = shift if @_; $i }