This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
diag.t: Load test.pl in BEGIN
authorFather Chrysostomos <sprout@cpan.org>
Wed, 27 Jun 2012 07:41:49 +0000 (00:41 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 27 Jun 2012 07:52:54 +0000 (00:52 -0700)
so that parentheses can be omitted in tests to be added.

t/porting/diag.t

index 4325fdc..4eef1df 100644 (file)
@@ -2,8 +2,10 @@
 use warnings;
 use strict;
 
-chdir 't';
-require './test.pl';
+BEGIN {
+  chdir 't';
+  require './test.pl';
+}
 
 plan('no_plan');