1BackPAN::Index::File(3pUms)er Contributed Perl DocumentatBiaocnkPAN::Index::File(3pm)
2
3
4

NAME

6       BackPAN::Index::File - Represent a file on BackPAN
7

SYNOPSIS

9         my $b = BackPAN::Index->new();
10         my $file = $b->file("authors/id/L/LB/LBROCARD/Acme-Colour-0.16.tar.gz");
11         print "  Date: " . $file->date . "\n";
12         print "  Path: " . $file->path . "\n";
13         print "  Size: " . $file->size . "\n";
14         print "   URL: " . $file->url . "\n";
15

DESCRIPTION

17       BackPAN::Index::File objects represent files on BackPAN.  It may
18       represent a release, a readme or meta file or just some random stuff on
19       BackPAN.
20

METHODS

22   date
23           my $date = $file->date;
24
25       Returns the upload date of the file, in UNIX epoch seconds.
26
27   path
28           my $path = $file->path;
29
30       Returns the full path to the file on CPAN.
31
32   size
33           my $size = $file->size;
34
35       Returns the size of the file in bytes.
36
37   url
38           my $url = $file->url;
39
40       Returns a URL to the file on a BackPAN mirror.
41
42   filename
43           my $filename = $file->filename;
44
45       Returns the filename part of the path.
46
47   release
48           my $release = $file->release;
49
50       Returns the release associated with this file, if any, as a
51       BackPAN::Index::Release instance.
52
53   as_hash
54           my $data = $file->as_hash;
55
56       Returns a hash ref containing the data inside $file.
57

AUTHOR

59       Leon Brocard <acme@astray.com>
60
62       Copyright (C) 2005-2009, Leon Brocard
63
64       This module is free software; you can redistribute it or modify it
65       under the same terms as Perl itself.
66

SEE ALSO

68       BackPAN::Index, BackPAN::Index::Release
69
70
71
72perl v5.38.0                      2023-07-20         BackPAN::Index::File(3pm)
Impressum