2 use vars qw(@funcs $i);
5 # Functions exported by FileCache;
6 @funcs = qw[cacheout cacheout_close];
10 use Test::More tests => 8;
12 # Test 6: Test that exporting both works to package main and
13 # other packages. Now using Exporter.
15 # First, we shouldn't be able to have these in our namespace
16 # Add them to BEGIN so the later 'use' doesn't influence this
19 ok(not __PACKAGE__->can($_)) foreach @funcs;
22 # With an empty import list, we also shouldn't have them in
24 # Add them to BEGIN so the later 'use' doesn't influence this
28 ok(not __PACKAGE__->can($_)) foreach @funcs;
32 # Now, we use FileCache in 'main'
35 ok(__PACKAGE__->can($_)) foreach @funcs;
38 # Now we use them in another package
42 ::ok(__PACKAGE__->can($_)) foreach @main::funcs;