John Bazik > Archive-Ar-1.14 > Archive::Ar

Download:
Archive-Ar-1.14.tar.gz

Dependencies

Annotate this POD

Related Modules

Archive::Zip
more...
By perlmonks.org

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.14   Source   Latest Release: Archive-Ar-2.02

NAME ^

Archive::Ar - Interface for manipulating ar archives

SYNOPSIS ^

        use Archive::Ar;

        my $ar = new Archive::Ar("./foo.ar");

        $ar->add_data("newfile.txt","Some contents", $properties);

        $ar->add_files("./bar.tar.gz", "bat.pl")
        $ar->add_files(["./again.gz"]);

        $ar->remove("file1", "file2");
        $ar->remove(["file1", "file2");

        my $filedata = $ar->get_content("bar.tar.gz");

        my @files = $ar->list_files();
        $ar->read("foo.deb");

        $ar->write("outbound.ar");

        $ar->DEBUG();

DESCRIPTION ^

Archive::Ar is a pure-perl way to handle standard ar archives.

This is useful if you have those types of old archives on the system, but it is also useful because .deb packages for the Debian GNU/Linux distribution are ar archives. This is one building block in a future chain of modules to build, manipulate, extract, and test debian modules with no platform or architecture dependence.

You may notice that the API to Archive::Ar is similar to Archive::Tar, and this was done intentionally to keep similarity between the Archive::* modules

Class Methods

CHANGES ^

TODO ^

A better unit test suite perhaps. I have a private one, but a public one would be nice if there was good file faking module.

Fix / investigate stuff in the BUGS section.

BUGS ^

To be honest, I'm not sure of a couple of things. The first is that I know of ar archives made on old AIX systems (pre 4.3?) that have a different header with a different magic string, etc. This module perfectly (hopefully) handles ar archives made with the modern ar command from the binutils distribution. If anyone knows of anyway to produce these old-style AIX archives, or would like to produce a few for testing, I would be much grateful.

There's no really good reason why this module shouldn't run on Win32 platforms, but admittedly, this might change when we have a file exporting function that supports owner and permission writing.

If you read in and write out a file, you get different md5sums, but it's still a valid archive. I'm still investigating this, and consider it a minor bug.

COPYRIGHT ^

Archive::Ar is copyright 2003 Jay Bonci <jaybonci@cpan.org>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: