Dist::Metadata::Archive(3pm)

Dist::Metadata::Archive3pm

Base class for dist::metadata archive files

Usage

  my $dist = Dist::Metadata->new(file => $path_to_archive);

Version

version 0.927

Overview

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 "new" in Dist::Metadata.

Methods

new

  $dist = Dist::Metadata::Archive->new(file => $path);

Accepts a single "file" argument that should be a path to a file.

If called from this base class "new()" will delegate to a subclass based on the filename and return a blessed instance of that subclass.

archive

Returns an object representing the archive file.

default_file_spec

Returns "Unix" since most archive files are be in unix format.

determine_name_and_version

Attempts to parse name and version from file name.

file

The "file" attribute passed to the constructor, used to load "archive".

read_archive

  $dist->read_archive($file);

Returns a format-specific object representing the specified file.

This must be defined by subclasses.

Releases

7 releases since Debian 7 (Wheezy); the text changed 4 times.

  1. 7
  2. 8
  3. 9–10
  4. 11
  5. 12–13

Author

Randy Stauner <[email protected]>

From libdist-metadata-perl 0.927-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.