jgrills at drivensnow.org
Thu Apr 26 12:36:12 PDT 2007
Thanks to the people that responded (both on list and privately), I think I
have a decent plan for upgrading these tools to reduce their external
dependencies. The archival part, certainly, can be handled internally by
native perl support for zip, tar+gzip/bzip2, or even a roll-my-own format.
One thing that these tools handle that might be missed by people who only
use it on a single platform is the automatic newline conversion, and I think
I've figured out a way to handle that as well. My plan, though not
fool-proof, is to store text files in the archive with a specific known
newline (most likely just a linefeed character), converting as necessary
when creating and extracting the archive. It's basically like defining a
network newline format akin to network byte order. There may be problems
with files that don't have consistent newline formats within one file, but
in that case I'll do the best I can. There could also be performance
problems when the tool is asked to process very large text files, but I
suspect that I'll be I/O bound anyway so I'm going to ignore that issue
until users complain.
Now, if I can get the time to actually make the changes.... But I have real
(paying) work to do now.
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Ivey, William
Sent: Thursday, April 26, 2007 11:02 AM
To: perforce-user at perforce.com
Subject: Re: [p4] p4tar/p4untar
In Perl there is Archive::Zip (also Algorithm::Diff for diff). Archive::Zip
supports reading and setting zip file comments, by the way.
I used this zip module to create a Perl-based, multi-platform installer a
few months ago. Using the module was one of the easiest parts of the
project. (I extended it to allow it to unzip a uuencoded archive which could
be attached to the script's __DATA__ section as an option.)
More information about the perforce-user