Flame has asked for the wisdom of the Perl Monks concerning the following question:
sub loadmod(@){ shift if(ref($_[0])); $@ = 0; foreach (@_){ croak("loadmod() cannot load any packages outside of it's own pa +ckage area (RPG). Package Requested: $pack") unless($_ =~ m/^RPG::/o +); eval{ require $_ }; croak("Unable to locate $_\n\@INC includes: ".join(", ", @INC)) +if($@); } }
The file requested really exists... as: RPG/Item/Weapon/Spear.pmUnable to locate RPG::Item::Weapon::Spear @INC includes: E:/Perl/lib, +E:/Perl/site/lib, . at test1.pl line 5
Edit: chipmunk 2001-10-16
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: require $package?
by andreychek (Parson) on Oct 17, 2001 at 04:24 UTC | |
by tilly (Archbishop) on Oct 17, 2001 at 05:01 UTC | |
|
Re: require $package?
by lestrrat (Deacon) on Oct 17, 2001 at 04:37 UTC | |
|
New Problem?
by Flame (Deacon) on Oct 17, 2001 at 06:06 UTC | |
by tilly (Archbishop) on Oct 17, 2001 at 06:31 UTC | |
by Flame (Deacon) on Oct 17, 2001 at 06:47 UTC | |
by tilly (Archbishop) on Oct 17, 2001 at 18:50 UTC | |
by Flame (Deacon) on Oct 17, 2001 at 23:45 UTC | |
|
Re: require $package?
by perrin (Chancellor) on Oct 17, 2001 at 04:40 UTC | |
|
Re: require $package?
by Flame (Deacon) on Oct 17, 2001 at 04:41 UTC |