Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Data files in a .par file

by rdfield (Priest)
on Jan 13, 2005 at 16:50 UTC ( #422017=note: print w/ replies, xml ) Need Help??


in reply to Data files in a .par file

PAR files are just Zip files, have you tried using Archive::Zip to extract the data file?

rdfield


Comment on Re: Data files in a .par file
Re^2: Data files in a .par file
by Tortue (Scribe) on Jan 14, 2005 at 10:41 UTC
    Yes, a possible solution is to not use PAR at all! You can replace:
    use PAR; use lib 'Bam-Kapow';
    (a.k.a. use PAR 'Bam-Kapow';) by:
    BEGIN { use Archive::Zip; my $zip = new Archive::Zip('Bam-Kapow.par'); $zip->extractTree('', 'shazam/'); use lib 'shazam/lib'; } END { use File::Path; rmtree 'shazam/'; }
    which produces the output:
    Using Bam::Kapow version 0.01 MOTD: Message of the day: PAR rules! Got Bam::Kapow from shazam/lib/Bam/Kapow.pm
    Of course, it would be nicer if PAR provided an option to do that, something like:
    use PAR 'extract';
    which would make it behave the same way it does when it's wrapped up in an executable.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://422017]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2015-07-03 17:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls