The caveat that modules will be downloaded each time the app is run can be worked around using LWP::Simple's mirror sub intead of get.
Of course, you'll have to provide the output file name to mirror:
my $response = $ua->mirror( $url, $file );
#EG:
$response = $ua->mirror( 'http://search.cpan.org/src/GAAS/libwww-perl-
+5.800/lib/LWP/UserAgent.pm',
'/usr/lib/perl/5.8.4/site_lib/LWP/UserAgent.p
+m' );
By doing this, the LWP module checks to see if the file already exists; if it does, a new copy is only downloaded if the remote file is newer than the local copy.
radiantmatrix
require General::Disclaimer;
"Users are evil. All users are evil. Do not trust them. Perl specifically offers the -T switch because it knows users are evil." - japhy
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.