summaryrefslogtreecommitdiff
path: root/lib/FileCache
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2004-12-11 13:58:32 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-12-13 10:02:57 +0000
commitc9463f45fe9c03847ac7230d0248f3c25eb914e6 (patch)
treea31ca73b9d3231c2f4cc33382ade1d297dbe4840 /lib/FileCache
parent8a2485f87de4ac33d6c8564ae6b27c5efc3e1430 (diff)
downloadperl-c9463f45fe9c03847ac7230d0248f3c25eb914e6.tar.gz
FileCache without import
Message-ID: <20041211235832.GA13462@windhund.schwern.org> p4raw-id: //depot/perl@23643
Diffstat (limited to 'lib/FileCache')
-rw-r--r--lib/FileCache/t/07noimport.t25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/FileCache/t/07noimport.t b/lib/FileCache/t/07noimport.t
new file mode 100644
index 0000000000..0f19ada68d
--- /dev/null
+++ b/lib/FileCache/t/07noimport.t
@@ -0,0 +1,25 @@
+#!./perl -w
+
+BEGIN {
+ chdir 't';
+ @INC = '../lib';
+}
+
+require './test.pl';
+plan( tests => 1 );
+
+# Try using FileCache without importing to make sure everything's
+# initialized without it.
+{
+ package Y;
+ use FileCache ();
+
+ my $file = 'foo';
+ END { unlink $file }
+ FileCache::cacheout($file);
+ print $file "bar";
+ close $file;
+
+ FileCache::cacheout("<", $file);
+ ::ok( <$file> eq "bar" );
+}