summaryrefslogtreecommitdiff
path: root/lib/FileCache/t/07noimport.t
blob: d2f926ce5c25400e8fdc2f85fb0af2631ea84c76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!./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" );
    close $file;
}