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

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
$ vi my-application.pl $ mkdir lib $ mkdir lib/File $ cp /usr/lib/perl5/site_perl/5.6.0/File/Tail.pm lib/File $ tar cf - . | gzip >my-application-archive.tar.gz
Unless a module builds itself in an architecture-specific way (note the lack of an architecture-specific directory in the library path), and it's safe to assume the users are all using the same version of Perl (File::Tail goes into 5.6.0, but who knows, it might run fine under 5.005*), copy the library to a local directory and 'use lib' to reference that directory. Now, pack that directory into the archive you use to distribute your application. Viola! You now have a self-contained application that uses non-core Perl modules. I would assume this could easily be adapted for Win32 (using .zip files) as well.

If you were planning ahead, you would build the modules using your local lib directory ahead of time, and be sure all of the pre-requisites made their way in there as well.

Is there something inherently wrong with this approach? This is what I always mean when I say it's usually trivial to extend an existing distribution mechanism to include the Perl modules that it needs.

In addition, if your application is going to be used on a multitude of Perl versions and platforms, carry your package to each of a set of sample systems that it will run on and reinstall your modules. They will all neatly go into their appropriate architecture- and version-specific directories, which will be all-but ignored by architectures and versions that don't use them. Pack the whole thing up again and carry it to your next system, or repeat the process on all of the other Perl versions installed on that system that you'll need.


In reply to Re: Re: (tye)Re: 'Tailing' a File? by Fastolfe
in thread 'Tailing' a File? by madhatter

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 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? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2022-07-07 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?