![]() |
|
Problems? Is your data what you think it is? | |
PerlMonks |
Re: Self Extracting Archives with Perl (almost)by strredwolf (Chaplain) |
on Jan 21, 2001 at 11:35 UTC ( [id://53309]=note: print w/replies, xml ) | Need Help?? |
There's a few problems I see that you haven't accomidated
for. I'll list a few of them: First, you really can't assume they have all the modules you need. Infact, you can't really assume they even have the latest version of Perl! Whoops! Bugger, eh? But instead of thinking "I need modules" think "What would the user have?" Definetly tar, yes. That's a standard UNIX program (unless using MS-something or MacOS). But not gzip in older (read: anchent) UNIXen. Lets assume gzip. If you check unpack, you'll find that it can do uudecoding of a line itself, since version 4.036. Very intresting, eh?
So all you need to do is take a line, decode it, and feed it to a opened pipe to "gzip -d -c | tar xfv -". Not only does it reduce a ton of complexity, it eazes things up a bit for the enduser (who may be a clueless moron for all we can tell).
--
In Section
Cool Uses for Perl
|
|