in reply to Dynamically create Packages
You may be able to get what you want by messing with %INC:
my $path = $package; $path =~ s{::}{/}g; $path .= '.pm'; $INC{$path} = '(eval)';
There may be something better to use than '(eval)'. It's just the first thing I thought of. When you then use the package again, it sees the entry in %INC and thinks it's already been loaded.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dynamically creat Packages
by Herkum (Parson) on Nov 04, 2008 at 17:55 UTC | |
by kyle (Abbot) on Nov 04, 2008 at 18:02 UTC |