> While running ttree I've run into what appears to be a bug when 
> using the LOAD_PERL option.  I'm using v2.04

This does appear to be a bug.  Your analysis looks correct.  Nice work!

There are several possible fixes, but I'm not sure which is most
elegant.

One way is to make _load return a flag that says whether it is a
plain perl module or not.  fetch() could then save this flag in a
new hash (eg: $self->{ FACTORY_IS_PLAIN_MODULE }->{ $name }).  Or,
based on the _load return flag, fetch() could save plain modules
in $self->{ FACTORY_PLAIN }->{ $name }, and normal modules in
$self->{ FACTORY }->{ $name }.  In either case, shifting @args
should be removed from _load(), and fetch() only needs to
unshift $context onto @args for the case of a real plugin.

Craig


Reply via email to