From: Jarkko Hietaniemi Date: Wed, 10 Apr 2002 21:25:30 +0000 (+0000) Subject: Backward portability from Dan Kogai. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0c384302fa9d6386e98f7d7039a229d3aa669e80;p=p5sagit%2Fp5-mst-13.2.git Backward portability from Dan Kogai. p4raw-id: //depot/perl@15851 --- diff --git a/ext/Storable/t/blessed.t b/ext/Storable/t/blessed.t index b1a18e6..88166dc 100644 --- a/ext/Storable/t/blessed.t +++ b/ext/Storable/t/blessed.t @@ -13,11 +13,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/canonical.t b/ext/Storable/t/canonical.t index b55669b..e44b459 100644 --- a/ext/Storable/t/canonical.t +++ b/ext/Storable/t/canonical.t @@ -13,11 +13,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/compat06.t b/ext/Storable/t/compat06.t index 1586b18..65f9123 100644 --- a/ext/Storable/t/compat06.t +++ b/ext/Storable/t/compat06.t @@ -16,11 +16,13 @@ # BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/dclone.t b/ext/Storable/t/dclone.t index 7e3adce..99753c9 100644 --- a/ext/Storable/t/dclone.t +++ b/ext/Storable/t/dclone.t @@ -13,11 +13,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/forgive.t b/ext/Storable/t/forgive.t index 5881098..a9ac3bf 100644 --- a/ext/Storable/t/forgive.t +++ b/ext/Storable/t/forgive.t @@ -19,11 +19,17 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($] < 5.006) { + print "1..0 # Skip: newer File::Spec needed\n"; + exit 0; + } + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/freeze.t b/ext/Storable/t/freeze.t index 9f64487..1582fcf 100644 --- a/ext/Storable/t/freeze.t +++ b/ext/Storable/t/freeze.t @@ -16,11 +16,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/lock.t b/ext/Storable/t/lock.t index 77d73bb..0f56cc9 100644 --- a/ext/Storable/t/lock.t +++ b/ext/Storable/t/lock.t @@ -20,11 +20,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/overload.t b/ext/Storable/t/overload.t index 6d1e581..7a195f1 100644 --- a/ext/Storable/t/overload.t +++ b/ext/Storable/t/overload.t @@ -16,11 +16,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/recurse.t b/ext/Storable/t/recurse.t index e3afc9c..fc82a9a 100644 --- a/ext/Storable/t/recurse.t +++ b/ext/Storable/t/recurse.t @@ -24,11 +24,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/retrieve.t b/ext/Storable/t/retrieve.t index c968485..33e6227 100644 --- a/ext/Storable/t/retrieve.t +++ b/ext/Storable/t/retrieve.t @@ -13,11 +13,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/store.t b/ext/Storable/t/store.t index b09b125..08be4c6 100644 --- a/ext/Storable/t/store.t +++ b/ext/Storable/t/store.t @@ -13,11 +13,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/tied.t b/ext/Storable/t/tied.t index 88131fe..146c544 100644 --- a/ext/Storable/t/tied.t +++ b/ext/Storable/t/tied.t @@ -13,11 +13,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/tied_hook.t b/ext/Storable/t/tied_hook.t index 46805cf..7a21301 100644 --- a/ext/Storable/t/tied_hook.t +++ b/ext/Storable/t/tied_hook.t @@ -16,11 +16,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/tied_items.t b/ext/Storable/t/tied_items.t index 3d0abf7..40fd476 100644 --- a/ext/Storable/t/tied_items.t +++ b/ext/Storable/t/tied_items.t @@ -17,11 +17,13 @@ # sub BEGIN { - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; } diff --git a/ext/Storable/t/utf8.t b/ext/Storable/t/utf8.t index 2160308..607478a 100644 --- a/ext/Storable/t/utf8.t +++ b/ext/Storable/t/utf8.t @@ -18,11 +18,13 @@ sub BEGIN { print "1..0 # Skip: no utf8 support\n"; exit 0; } - chdir('t') if -d 't'; - @INC = '.'; - push @INC, '../lib'; + if ($ENV{PERL_CORE}){ + chdir('t') if -d 't'; + @INC = '.'; + push @INC, '../lib'; + } require Config; import Config; - if ($Config{'extensions'} !~ /\bStorable\b/) { + if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { print "1..0 # Skip: Storable was not built\n"; exit 0; }