The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Dist::Metadata::Tar - Enable Dist::Metadata for tar files

VERSION

version 0.910

SYNOPSIS

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

DESCRIPTION

This is a subclass of Dist::Metadata::Dist to enable determining the metadata from a tar file.

This is probably the most useful subclass.

It's probably not very useful on it's own though, and should be used from "new" in Dist::Metadata.

METHODS

new

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

Accepts a single file argument that should be a path to a tar.gz file.

default_file_spec

Returns Unix since tar files must 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 "tar".

file_content

Returns the content for the specified file.

find_files

Returns a list of regular files in the archive.

tar

Returns the Archive::Tar object in use (loaded from the file attribute).

AUTHOR

Randy Stauner <rwstauner@cpan.org>

COPYRIGHT AND LICENSE

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.