NAME
MetaCPAN::Client::File - A File data object
VERSION
version 2.032000
DESCRIPTION
A MetaCPAN file entity object.
ATTRIBUTES
status
Returns a release status like backpan
, cpan
, or latest
.
date
An ISO8601 datetime string like 2016-11-19T12:41:46
indicating when the file was uploaded.
author
The author's PAUSE id.
maturity
This will be either release
or developer
.
directory
A boolean indicating whether or not the path represents a directory.
indexed
A boolean indicating whether or not the content is indexed.
documentation
The name of the module for which this file contains docs. This may be undef
id
The file's internal MetaCPAN id.
authorized
A boolean indicating whether or not this file was part of an authorized upload.
version
The distribution version that contains this file.
version_numified
The numified version of the distribution that contains the file.
release
The release that contains this file, which will be something like Moose-2.2004
.
binary
A boolean indicating whether or not this file contains binary content.
name
The File's name, without any directory path included.
path
The file's path within the distribution archive, relative to the root of the archive.
abstract
If the file contains POD with a NAME
section, then this attribute will include the abstract portion of the name.
deprecated
The deprecated field value for this file.
description
If the file contains POD with a DESCRIPTION
section, then this attribute will contain that description.
distribution
The name of the distribution that contains the file.
level
A 0-indexed indication of how many directories deep this file is, relative to the archive root.
sloc
If the file contains code, this will contain the number of lines of code in the file.
slop
If the file contains POD, this will contain the number of lines of POD in the file.
mime
The file's mime type.
module
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 thismodule
data.
pod_lines
An arrayref.
stat
A hashref containing stat()
all information about the file. The keys are:
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.
download_url
A URL for the distribution archive that contains this file.
METHODS
pod
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.
source
my $source = $module->source();
Returns the source code for the file.
metacpan_url
Returns a link to the file source page on MetaCPAN.
AUTHORS
Sawyer X <xsawyerx@cpan.org>
Mickey Nasriachi <mickey@cpan.org>
COPYRIGHT AND LICENSE
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.