MetaCPAN::Client::File - A File data object
version 2.030000
A MetaCPAN file entity object.
Returns a release status like backpan, cpan, or latest.
backpan
cpan
latest
An ISO8601 datetime string like 2016-11-19T12:41:46 indicating when the file was uploaded.
2016-11-19T12:41:46
The author's PAUSE id.
This will be either release or developer.
release
developer
A boolean indicating whether or not the path represents a directory.
A boolean indicating whether or not the content is indexed.
The name of the module for which this file contains docs. This may be undef
undef
The file's internal MetaCPAN id.
A boolean indicating whether or not this file was part of an authorized upload.
The distribution version that contains this file.
The numified version of the distribution that contains the file.
The release that contains this file, which will be something like Moose-2.2004.
Moose-2.2004
A boolean indicating whether or not this file contains binary content.
The File's name, without any directory path included.
The file's path within the distribution archive, relative to the root of the archive.
If the file contains POD with a NAME section, then this attribute will include the abstract portion of the name.
NAME
The deprecated field value for this file.
If the file contains POD with a DESCRIPTION section, then this attribute will contain that description.
DESCRIPTION
The name of the distribution that contains the file.
A 0-indexed indication of how many directories deep this file is, relative to the archive root.
If the file contains code, this will contain the number of lines of code in the file.
If the file contains POD, this will contain the number of lines of POD in the file.
The file's mime type.
If the file contains module indexed by PAUSE, then this attribute contains an arrayref of hashrefs, one for each module. The hashrefs have the following keys:
name
The module name.
indexed
Whether or not the file is indexed by MetaCPAN.
authorized
Whether or not the module is part of an authorized upload.
version
The version of the module that this file contains.
version_numified
The numified version of the module that this file contains.
associated_pod
A path you can use with the MetaCPAN::Client->file method to get the file that contains POD for this module. In most cases, that will be the same file as that one that contains this module data.
MetaCPAN::Client->file
module
An arrayref.
A hashref containing stat() all information about the file. The keys are:
stat()
mtime
The Unix epoch of the file's last modified time.
mode
The file's mode (as an integer, not an octal representation).
size
The file's size in bytes.
A URL for the distribution archive that contains this file.
my $pod = $module->pod(); # default = plain my $pod = $module->pod($type);
Returns the POD content for the module/file.
Takes a type as argument.
Supported types: plain, html, x-pod, x-markdown.
my $source = $module->source();
Returns the source code for the file.
Returns a link to the file source page on MetaCPAN.
Sawyer X <xsawyerx@cpan.org>
Mickey Nasriachi <mickey@cpan.org>
This software is copyright (c) 2016 by Sawyer X.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install MetaCPAN::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MetaCPAN::Client
CPAN shell
perl -MCPAN -e shell install MetaCPAN::Client
For more information on module installation, please visit the detailed CPAN module installation guide.