bsdz has asked for the wisdom of the Perl Monks concerning the following question:
Using a test function like: -package A; use strict; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw( build_funcs ); sub build_funcs { foreach ('A', 'B', 'C') { eval " print \"building $_ func\\n\"; sub ${_}_func { print \"$_ func called\\n\"; } "; push @EXPORT, "${_}func"; } } 1;
Any experience with this one?use strict; use lib '.'; use A; &build_funcs; &A_func;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: dynamic symbol Exporter
by broquaint (Abbot) on Nov 15, 2003 at 20:28 UTC | |
|
Re: dynamic symbol Exporter
by simonm (Vicar) on Nov 15, 2003 at 20:28 UTC | |
|
Re: dynamic symbol Exporter
by !1 (Hermit) on Nov 15, 2003 at 20:30 UTC | |
|
Re: dynamic symbol Exporter
by bsb (Priest) on Dec 22, 2003 at 09:32 UTC |