in reply to Data files included in a package
But don't take my word for it. Take a look at a well-established module from CPAN: XML::Parser. Just look at the character encoding files ("*.enc") that XML::Parser::Expat, the underlying parser engine, uses, and how it locates them in @INC — source of XML/Parser/Expat.pm, populating @Encoding_Path.
Addendum.
is there a method for determining the path to the package?Take a look at %INC. If your module is Foo::Bar then it'll be under $INC{"Foo/Bar.pm"}, even on systems where the file path separator isn't a slash, like Windows (actually a backslash, though a slash works too) and the Apple Macintosh, where it is ":" (!).
|
---|