From: Mark-Jason Dominus Date: Tue, 26 Jun 2001 12:33:01 +0000 (-0400) Subject: Re: SDBM on VMS (was Re: a report on perl@10930 results on a couple of Alphas) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6b79e9019a2c0320c7bd02d118a806da8b3f822c;p=p5sagit%2Fp5-mst-13.2.git Re: SDBM on VMS (was Re: a report on perl@10930 results on a couple of Alphas) Message-ID: <20010626163301.31298.qmail@plover.com> p4raw-id: //depot/perl@10968 --- diff --git a/lib/Memoize/t/tie.t b/lib/Memoize/t/tie.t index 9b9cd4f..e058674 100755 --- a/lib/Memoize/t/tie.t +++ b/lib/Memoize/t/tie.t @@ -3,7 +3,13 @@ use lib qw(. ..); use Memoize 0.52 qw(memoize unmemoize); use Fcntl; -use Memoize::AnyDBM_File; +eval {require Memoize::AnyDBM_File}; +if ($@) { + print "1..0\n"; + exit 0; +} + + print "1..4\n"; @@ -24,7 +30,7 @@ sub n { } if (eval {require File::Spec::Functions}) { - File::Spec::Functions->import(qw(catfile tmpdir)); + File::Spec::Functions->import('tmpdir', 'catfile'); $tmpdir = tmpdir(); } else { *catfile = sub { join '/', @_ }; diff --git a/lib/Memoize/t/tie_sdbm.t b/lib/Memoize/t/tie_sdbm.t index 44e7d76..a55dde0 100644 --- a/lib/Memoize/t/tie_sdbm.t +++ b/lib/Memoize/t/tie_sdbm.t @@ -3,7 +3,7 @@ use lib qw(. ..); use Memoize 0.45 qw(memoize unmemoize); use Fcntl; -use Memoize::SDBM_File; +# use Memoize::SDBM_File; # $Memoize::GDBM_File::Verbose = 0; sub i { @@ -20,7 +20,7 @@ sub n { $_[0]+1; } -eval {require SDBM_File}; +eval {require Memoize:SDBM_File}; if ($@) { print "1..0\n"; exit 0; @@ -29,10 +29,10 @@ if ($@) { print "1..4\n"; if (eval {require File::Spec::Functions}) { - File::Spec::Functions->import(qw(catfile tmpdir)); - $tmpdir = tmpdir(); + File::Spec::Functions->import('tmpdir', 'catfile'); + $tmpdir = tmpdir(); } else { - *catfile = sub { join '/', @_ }; + *catfile = sub { join '/', @_ }; $tmpdir = $ENV{TMP} || $ENV{TMPDIR} || '/tmp'; } $file = catfile($tmpdir, "md$$");