- or download this
# Module1.pm
# ==========
...
package Module1;
our $VERSION = '2.0';
1;
- or download this
# Module2.pm
# ==========
...
our $VERSION = '2.0';
our @ISA = 'Exporter';
1;
- or download this
# script.pl
# =========
...
BEGIN { print("Loading Module2...\n"); }
use Module2 '3.0';
BEGIN { print("Loaded.\n"); }
- or download this
output
======
...
Loading Module2...
Module2 3.0 required--this is only version 2.0 (Module2.pm) at script.
+pl line 6
BEGIN failed--compilation aborted at script.pl line 6.
- or download this
package Module2;
use Exporter ();
our $VERSION = '2.0';
*import = \&Exporter::import;
1;
- or download this
package Module2;
use Exporter ();
...
*import = \&Exporter::import;
*require_version = \&Exporter::require_version;
1;