in reply to How to include a lot of files in a module?
If so, look at the %INC variable, specifically at $INC{'My/Module.pm'}. Here's a small sample:
package t63; use File::Basename; my $incpath = __PACKAGE__.".pm"; $incpath =~ s/::/\//g; our $dir = dirname($INC{$incpath})||'.'; print "Dir: $dir\n"; 1;
You might also want to look at the FindBin module, since it does almost what you want but not quite.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to include a lot of files in a module?
by Miguel (Friar) on Jul 15, 2006 at 10:36 UTC |