amiribarksdale has asked for the wisdom of the Perl Monks concerning the following question:
This question is really simple.
How do I export a dispatch table from an external module?
my $typecolors = { 1 => \&release, 2 => \&event, 3 => \&gossip, 4 => \&props, 5 => \&diss, 6 => \&other, }; sub release {...} sub event {...} sub gossip {...} sub props {...} sub diss {...} sub other {...}
I have tried
use subs qw($typecolors);
and it just doesn't work. $typecolors is OK to export in the module, and so are the subs it calls.
Amiri
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Exporting a Dispatch Table
by FunkyMonk (Bishop) on Apr 08, 2008 at 21:30 UTC | |
by amiribarksdale (Acolyte) on Apr 09, 2008 at 01:04 UTC | |
|
Re: Exporting a Dispatch Table
by kyle (Abbot) on Apr 08, 2008 at 21:12 UTC | |
by ikegami (Patriarch) on Apr 09, 2008 at 01:52 UTC | |
|
Re: Exporting a Dispatch Table
by spx2 (Deacon) on Apr 08, 2008 at 21:58 UTC |