5 use vars qw(@EXPORT @EXPORT_OK @ISA $IMPORTED);
9 @EXPORT_OK = qw(func1);
11 ### test if import gets called properly
12 sub import { $IMPORTED = 1;
13 ### this breaks on 5.8.[45] which have a bug with goto's losing
14 ### arguments in @_. This is the cause of the 0.14 tester failures
15 ### under 5.8.[45]. The bug is NOT in exporter, but core perl:
16 ### http://testers.cpan.org/show/Module-Load.html
17 #goto &Exporter::import;
19 ### instead, use the undocumented, but widely used $ExportLevel
20 ### which will make sure we pass all arguments, and even works
22 do { local $Exporter::ExportLevel += 1; Exporter::import(@_) }
25 sub imported { $IMPORTED; }
27 sub func1 { return "func1"; }
29 sub func2 { return "func2"; }