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