in reply to Re^4: require() @INC hooks problem
in thread require() @INC hooks problem
I don't know what that means.
> With regard to your suggestion of "Just eval the code and update %INC", I'm not following you in terms of how that might be implemented. Could you provide a code example?
something like (totally untested)
sub create_class { my ($class) = @_; my $source = <<~EOF; package $class; use parent 'MooselessRequireHookTest'; 1; EOF eval $source; my $name = $class =~ s(::)(\/)gr; $INC{"$name.pm"} = 'imported via eval'; }
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: require() @INC hooks problem
by LanX (Saint) on Dec 28, 2020 at 16:35 UTC | |
by LanX (Saint) on Dec 28, 2020 at 17:04 UTC | |
|
Re^6: require() @INC hooks problem
by kcott (Archbishop) on Dec 29, 2020 at 04:11 UTC |