Base class for dist::metadata archive files
version 0.925
my $dist = Dist::Metadata->new(file => $path_to_archive);
This is a subclass of Dist::Metadata::Dist to enable determining the metadata from an archive file.
It is a base class for archive file formats:
Dist::Metadata::Tar
Dist::Metadata::Zip
It's not useful on it's own and should be used from \*(L"new\*(R" in Dist::Metadata.
$dist = Dist::Metadata::Archive->new(file => $path);
Accepts a single \*(C`file\*(C' argument that should be a path to a file.
If called from this base class \*(C`new()\*(C' will delegate to a subclass based on the filename and return a blessed instance of that subclass.
Returns an object representing the archive file.
Returns \*(C`Unix\*(C' since most archive files are be in unix format.
Attempts to parse name and version from file name.
The \*(C`file\*(C' attribute passed to the constructor, used to load \*(L"archive\*(R".
$dist->read_archive($file);
Returns a format-specific object representing the specified file.
This must be defined by subclasses.
Randy Stauner <[email protected]>
This software is copyright (c) 2011 by Randy Stauner.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.