5 #For tests within the perl distribution
6 @INC = '../lib' if -d '../lib';
9 # Functions exported by FileCache;
10 @funcs = qw[cacheout cacheout_close];
17 # Test 6: Test that exporting both works to package main and
18 # other packages. Now using Exporter.
20 # First, we shouldn't be able to have these in our namespace
21 # Add them to BEGIN so the later 'use' doesn't influence this
26 print 'not ' if __PACKAGE__->can($f);
31 # With an empty import list, we also shouldn't have them in
33 # Add them to BEGIN so the later 'use' doesn't influence this
39 print 'not ' if __PACKAGE__->can($f);
45 # Now, we use FileCache in 'main'
49 print 'not ' if !__PACKAGE__->can($f);
54 # Now we use them in another package
57 for my $f (@main::funcs) {
59 print 'not ' if !__PACKAGE__->can($f);
60 print "ok $main::i\n";