Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Look at the Module::Build::Cookbook on adding new file types to the build process. E.g. (from the cookbook)

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

use Module::Build; my $build = new Module::Build ( module_name => 'Boo::Baz', ... ); $build->add_build_element('dat'); $build->create_build_script;

This will find all .dat files in the lib/ directory, copy them to the blib/lib/ directory during the build action, and install them during the install action.

There's more in the cookbook about what to do if you don't want to leave the files under lib, but keep them somewhere else instead.

use Module::Build; my $build = new Module::Build ( module_name => 'Boo::Baz', dat_files => {'some/dir/Foo.dat' => 'lib/Boo/Baz/Foo.dat'}, ... ); $build->add_build_element('dat'); $build->create_build_script;

-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: Module::Build's pm_files in ExtUtils::MakeMaker? by xdg
in thread Module::Build's pm_files in ExtUtils::MakeMaker? by LTjake

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2024-04-24 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found