Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I'd like to know if there's an official way to do this too. In the mean time, here's what I did.

    I package the files like this:


    cpan installs that just fine, and I can get at it from my module by mucking around with my entry in %INC. The last bit is ugly though, and I'd like to know how to improve it.

    Here's the code I use to find my data file:

        my $datafile_path = $INC{'My/'};
        $datafile_path =~ s!\.pm$!!;