1Dist::Metadata::ArchiveU(s3e)r Contributed Perl DocumentaDtiisotn::Metadata::Archive(3)
2
3
4
6 Dist::Metadata::Archive - Base class for Dist::Metadata archive files
7
9 version 0.927
10
12 my $dist = Dist::Metadata->new(file => $path_to_archive);
13
15 This is a subclass of Dist::Metadata::Dist to enable determining the
16 metadata from an archive file.
17
18 It is a base class for archive file formats:
19
20 • Dist::Metadata::Tar
21
22 • Dist::Metadata::Zip
23
24 It's not useful on it's own and should be used from "new" in
25 Dist::Metadata.
26
28 new
29 $dist = Dist::Metadata::Archive->new(file => $path);
30
31 Accepts a single "file" argument that should be a path to a file.
32
33 If called from this base class "new()" will delegate to a subclass
34 based on the filename and return a blessed instance of that subclass.
35
36 archive
37 Returns an object representing the archive file.
38
39 default_file_spec
40 Returns "Unix" since most archive files are be in unix format.
41
42 determine_name_and_version
43 Attempts to parse name and version from file name.
44
45 file
46 The "file" attribute passed to the constructor, used to load "archive".
47
48 read_archive
49 $dist->read_archive($file);
50
51 Returns a format-specific object representing the specified file.
52
53 This must be defined by subclasses.
54
56 Randy Stauner <rwstauner@cpan.org>
57
59 This software is copyright (c) 2011 by Randy Stauner.
60
61 This is free software; you can redistribute it and/or modify it under
62 the same terms as the Perl 5 programming language system itself.
63
64
65
66perl v5.32.1 2021-01-27 Dist::Metadata::Archive(3)