From a80e93c2ac4ef033b7aff53be0a697746e09f7ea Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Thu, 1 Jul 2010 20:41:21 +0100 Subject: t/lib/common.pl can use caller to infer the name of the pragma under test. This avoids needing to use a variable in package main to pass in information. Also, remove an unnecessary $ENV{PERL5LIB} assignment cargo-culted into most users of t/lib/common,pl, and remove the BEGIN block as the code it contained doesn't need to run at BEGIN time. --- lib/warnings.t | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/warnings.t') diff --git a/lib/warnings.t b/lib/warnings.t index d03b8c52c7..ee696fe2a1 100644 --- a/lib/warnings.t +++ b/lib/warnings.t @@ -1,11 +1,7 @@ #!./perl -BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; - $ENV{PERL5LIB} = '../lib'; -} +chdir 't' if -d 't'; +@INC = '../lib'; -our $pragma_name = "warnings"; our $UTF8 = (${^OPEN} || "") =~ /:utf8/; require "../t/lib/common.pl"; -- cgit v1.2.1