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??

If you intend to create .par archives from lots of CPAN distributions, I suggest you have a look at the PAR::Dist::FromCPAN module and the cpan2par tool accompanying it. It started out as a quick and dirty tool I used for testing PAR::Repository, but it should be quite usable now. Theoretically, it can even follow arbitrary CPAN dependencies. One exception are modules using Module::AutoInstall which break the CPAN.pm dependency checking itself. (Read: They're broken.)

In fact, your use case kind of sounds like you could have a look at PAR::Repository / PAR::Repository::Client, too. Just keep in mind that PAR::Repository (the administrative interface which can inject new .par's into the repository) doesn't run on win32 because it needs symlinks.

The basic use case of PAR::Repositories on the client side is as follows:

use strict; use warnings; use PAR { repository => 'file:///path/to/repository/on/nfs/' }; # or: # use PAR { repository => 'http://repository/url' }; use Foo; # Foo loaded from the repository if not found locally.

For finer-grained control, you can eschew the interface using PAR and create your PAR::Repository::Client by hand. That way, you can use it to locally install and update the distributions instead of fetching them from the repository, etc.

On a side note: you can embed arbitrary data files (i.e. CSS/HTML) into a .par and have them extracted when the .par is loaded. You would find them in the $ENV{PAR_TEMP} directory or so. (The PAR::Environment POD has the details on all the environment variables PAR uses. If in doubt, test.)

In the hope this helps,
Steffen


In reply to Re: Using PAR for a relocatable environment by tsee
in thread Using PAR for a relocatable environment by dragonchild

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 making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-20 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found