summaryrefslogtreecommitdiff
path: root/lib/feature.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/feature.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/feature.t')
-rw-r--r--lib/feature.t9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/feature.t b/lib/feature.t
index a60644f442..0818f37c34 100644
--- a/lib/feature.t
+++ b/lib/feature.t
@@ -1,10 +1,5 @@
#!./perl
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- $ENV{PERL5LIB} = '../lib';
-}
-
-our $pragma_name = "feature";
+chdir 't' if -d 't';
+@INC = '../lib';
require "../t/lib/common.pl";