Now, how do I include these files into the package?

What do you mean by "the package"? Do you mean that you want to have these files bundled up with your .pm files into a distribution so that if your module is installed somewhere, the files come along with it and your module can find them automatically?

If that's what you want, then you need to include instructions to that effect in your Makefile.PL or Build.PL so that those files are installed in your Perl library path. By default, only .pm and .pod files are actually installed. For example, here's a recipe from the Module::Build::Cookbook:

Adding new file types to the build process Sometimes you might have extra types of files that you want to insta +ll alongside the standard types like .pm and .pod files. For instance, +you might have a Bar.dat file containing some data related to the "Foo:: +Bar" module. Assuming the data doesn't need to be created on the fly, the best place for it to end up is probably as Foo/Bar.dat somewhere in perl's @INC path so "Foo::Bar" can access it easily at runtime. The following code from a sample "Build.PL" file demonstrates how to accomplish this:

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.


In reply to Re: How to include a lot of files in a module? by xdg
in thread 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.