use strict;
use warnings;
- BEGIN {
- require Exporter;
+ # Get the import method from Exporter to export functions and
+ # variables
+ use Exporter 5.57 'import';
- # set the version for version checking
- our $VERSION = 1.00;
+ # set the version for version checking
+ our $VERSION = '1.00';
- # Inherit from Exporter to export functions and variables
- our @ISA = qw(Exporter);
+ # Functions and variables which are exported by default
+ our @EXPORT = qw(func1 func2);
- # Functions and variables which are exported by default
- our @EXPORT = qw(func1 func2);
-
- # Functions and variables which can be optionally exported
- our @EXPORT_OK = qw($Var1 %Hashit func3);
- }
+ # Functions and variables which can be optionally exported
+ our @EXPORT_OK = qw($Var1 %Hashit func3);
# exported package globals go here
our $Var1 = '';
sub func1 { ... }
sub func2 { ... }
- # this one isn't exported, but could be called directly
+ # this one isn't always exported, but could be called directly
# as Some::Module::func3()
sub func3 { ... }