Esteemed monks,
This is a recurrent question (Including text files in Modules) but I still don't understand how do I include files in directories and subdirectories inside a package. I've been trying all the possibilities posted in the above thread (and some others) but with no success.

The problem is:
I have a file system structure similiar to this:

My/Module | +------- Files | +----- FilesOfTypeA | | | +----File1 | +----File2 | +----File3 | +----FileN | +----- FilesOfTypeB | | | +----File1 | +----File2 | +----File3 | +----FileN | +----- FilesOfTypeN
There are 1000s of files (TXT files) in these directories.
Some files contain specifications which cannot be modified and others contain perl data structures (extracted from those files).

Now, how do I include these files into the package? I've been trying with File::Spec, Cwd, File::Basename but with no success: 'make test' works but then, when I 'use My::Module', it complains about not finding the files.

Sorry for not posting my code, but I don't have it at hand.

Thank you for your time,
Miguel


In reply to How to include a lot of files in a module? by Miguel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.