in reply to Module Inheritance
So there we've set up Exporter to export testsub whenever Hoos is used. Also, you should require Exporter as useing it calls its own import method.shell> cat Hoos.pm package Hoos; our @EXPORT = 'testsub'; use Exporter; our @ISA = 'Exporter'; sub testsub { print "exported testsub() ok\n" } 1; shell> perl -e 'use Hoos; testsub()' exported testsub() ok
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Module Inheritance
by Abigail-II (Bishop) on Apr 29, 2004 at 13:00 UTC | |
by broquaint (Abbot) on Apr 29, 2004 at 13:36 UTC | |
by Abigail-II (Bishop) on Apr 29, 2004 at 13:42 UTC | |
by broquaint (Abbot) on Apr 29, 2004 at 14:05 UTC | |
by bart (Canon) on Apr 29, 2004 at 15:00 UTC |