Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

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

Personally, I would look at splitting the script into two scripts and using the standard Perl installation approach, but I understand if you want to make things as easy as possible for the user.

The standard installation approach would be to list all the modules your program needs in Makefile.PL and then just use cpanm --installdeps . to install all the modules your script needs automatically.

This has the drawback that you need a second file with your script, but the huge advantage that your installation process now also works with cpan and almost all other, and future installation processes for Perl stuff.

A very simplicistic Makefile.PL would look like the following:

#!perl -w use ExtUtils::MakeMaker; our %module = ( NAME => 'myscript, AUTHOR => q{zidi <zidi@example.com>}, PREREQ_PM => { 'strict' => 0, ... }, ); if(! caller()) { WriteMakefile( %module ); }; 1;

In reply to Re^3: Use 'use' in foreach by Corion
in thread Use 'use' in foreach by zidi

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 sharing their wisdom with the Monastery: (7)
As of 2024-03-28 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found