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

Re: Using PAR for a relocatable environment

by tsee (Curate)
on Apr 19, 2007 at 14:00 UTC ( #610953=note: print w/replies, xml ) Need Help??


in reply to Using PAR for a relocatable environment

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://610953]
help
Chatterbox?
[choroba]: RonW Yes, but then, one day, they needed to switch from FTP to SFTP, and... but I can't give the whole talk away here :)
[RonW]: Tunnel FTP through stunnel?
[james28909]: i guess i should have done it in perl. i bet it woulnt have taken me 5 hours to figure out haha
[choroba]: In the end, I was able to upgrade Perl from 5.8.3 to 5.22 and install Net::SFTP::Foreign , at least for the task involved
[james28909]: what would be the best way to capture that stream with perl? ffmpeg args -rtp rtp://127.0.0.1?

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-05-22 21:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?