in reply to Re: How relevant is the order of 'use's ?
in thread How relevant is the order of 'use's ?
yesss.... Your response, as well the previous one, gave the right direction.
The defined import function is *not* OK. Replacing it with something closer to what Exporter does seems to solve the problem:
The defined import function is *not* OK. Replacing it with something closer to what Exporter does seems to solve the problem:
Now I just have to understand how come that it works :)package Demo2; sub import { #${[caller]->[0].'::'}{$_} = ${__PACKAGE__."::"}{$_} *{[caller]->[0].'::'.$_} = \&{__PACKAGE__."::$_"} foreach grep { not /^(ISA|isa|BEGIN|import|Dumper)$/ } keys %{__PACKAGE__."::"}; } use constant { SUCCESS => 0, }; 1;
In Section
Seekers of Perl Wisdom