BackPAN::Index::File - Represent a file on BackPAN
my $b = BackPAN::Index->new(); my $file = $b->file("authors/id/L/LB/LBROCARD/Acme-Colour-0.16.tar.gz"); print " Date: " . $file->date . "\n"; print " Path: " . $file->path . "\n"; print " Size: " . $file->size . "\n"; print " URL: " . $file->url . "\n";
BackPAN::Index::File objects represent files on BackPAN. It may represent a release, a readme or meta file or just some random stuff on BackPAN.
my $date = $file->date;
Returns the upload date of the file, in UNIX epoch seconds.
my $path = $file->path;
Returns the full path to the file on CPAN.
my $size = $file->size;
Returns the size of the file in bytes.
my $url = $file->url;
Returns a URL to the file on a BackPAN mirror.
my $filename = $file->filename;
Returns the filename part of the path.
my $release = $file->release;
Returns the release associated with this file, if any, as a BackPAN::Index::Release instance.
my $data = $file->as_hash;
Returns a hash ref containing the data inside
Leon Brocard <email@example.com>
Copyright (C) 2005-2009, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.