summaryrefslogtreecommitdiff
path: root/lib/warnings.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-07-01 20:41:21 +0100
committerNicholas Clark <nick@ccl4.org>2010-07-01 20:43:36 +0100
commita80e93c2ac4ef033b7aff53be0a697746e09f7ea (patch)
treefbc737db63b44d6899114b2b7459ebef0475179a /lib/warnings.t
parent98b4ddd60241e805202ea45b0e3e203be7a46e05 (diff)
downloadperl-a80e93c2ac4ef033b7aff53be0a697746e09f7ea.tar.gz
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.
Diffstat (limited to 'lib/warnings.t')
-rw-r--r--lib/warnings.t8
1 files changed, 2 insertions, 6 deletions
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";