In Foo.pm package Foo; use strict; use warnings; use Exporter; our @ISA = qw( Exporter ); our @EXPORT_OK = qw( foo ); sub foo { print "Foo\n"; } 1; ---------- In Bar.pm package Bar; use strict; use warnings; use Foo qw( foo ); our @ISA = qw( Foo ); sub bar { foo() } 1; ---------- In test.pl #!/usr/bin/perl use strict; use warnings; use Bar; Bar::foo(); Bar::bar();
*shrugs*
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
In reply to Re: AUTOLOAD -- deprecated, in relation to inherited method/function
by dragonchild
in thread AUTOLOAD -- deprecated, in relation to inherited method/function
by Sifmole
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |