Hello wanna_code_perl,
Note that use MODULE LIST is equivalent to BEGIN { require MODULE; MODULE->import( LIST ); }; so, if you have:
use Exporter::Easy ( OK => [ keys %subs ], TAGS => all => [ keys %subs ], ], );
the implicit BEGIN block invokes a reference to the %subs hash before it has been initialised. Changing to require works for me (i.e., it passes your test script with either use Foo qw/subA subB Abus Bbus/; or use Foo ':all';):
require Exporter::Easy; Exporter::Easy->import( OK => [ keys %subs ], TAGS => [ all => [ keys %subs ], ], );
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Dynamic exports with Exporter::Easy
by Athanasius
in thread Dynamic exports with Exporter::Easy
by wanna_code_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |