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
In reply to require $package? by Flame
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |