package Homepage;
use strict;
use warnings;
use diagnostics;
require "MRlib.pl"; #this script has logic for AUTOLOAD written, wher
+e it checks for main package and method name and call for require<br/
+>
## Upon using below require it works, otherwise, it throws Use of inhe
+rited AUTOLOAD for non-method FP::Introduction::Introduce() is no lon
+ger allowed at test_autoload.pl line 17. error
## require "C:\\Users\\xxx\\Documents\\Application\\Perl_upgrade\\test
+_autoload\\SUBS\\App\\Introduction.pl";
BEGIN {
*AUTOLOAD = \&FP::AUTOLOAD;
}
print "I started the program\n";
#Below Introduce sub is written in "C:\\Users\\xxx\\Documents\\Applica
+tion\\Perl_upgrade\\test_autoload\\SUBS\\App\\Introduction.pl" script
&FP::Introduction::Introduce;
print "I got to the end of the program\n";
1;
I hope it makes sense now !
Thank you
|