this is main_1
this is main_2
this is main_3
This is test.pl
####
########## main_1.pm #############################
package main::;
sub test1{
print "This is test1 in main_1\n";
}
####
main_1.pm did not return a true value at test.pl line 4.
BEGIN failed--compilation aborted at test.pl line 4.
####
#!/usr/bin/perl
use warnings;
use strict;
use main_1;
use main_2;
use main_3;
print "This is test.pl\n";
&test1;
####
this is main_2
this is main_3
Undefined subroutine &main::test1 called at test.pl line 8.
This is test.pl
####
########## main_1.pm #############################
package main::main_1;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(&test1);
sub test1{
print "This is test1 in main_1\n";
}
1;
##################################################
####
this is main_2
this is main_3
This is test.pl
This is test1 in main_1