diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-07-01 20:41:21 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-07-01 20:43:36 +0100 |
commit | a80e93c2ac4ef033b7aff53be0a697746e09f7ea (patch) | |
tree | fbc737db63b44d6899114b2b7459ebef0475179a /lib/subs.t | |
parent | 98b4ddd60241e805202ea45b0e3e203be7a46e05 (diff) | |
download | perl-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/subs.t')
-rw-r--r-- | lib/subs.t | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/subs.t b/lib/subs.t index 1f719c7b78..4ad4f8f6ca 100644 --- a/lib/subs.t +++ b/lib/subs.t @@ -1,10 +1,6 @@ #!./perl -BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; - $ENV{PERL5LIB} = '../lib'; -} +chdir 't' if -d 't'; +@INC = '../lib'; -our $pragma_name = "subs"; require "../t/lib/common.pl"; |