Module-Release
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
a module.
To build the distribution, run this file normally:
% perl Makefile.PL
But, it's more interesting than that. You can load it with C<require>
and call C<arguments> to get the data structure it passes to
C<WriteMakefile>:
my $package = require '/path/to/Makefile.PL';
my $arguments = $package->arguments;
Note that C<require>-ing a file makes an entry in C<%INC> for exactly
that name. If you try to C<require> another file with the same name,
even from a different path, C<require> thinks it has already loaded
the file. As such, I recommend you always require the full path to the
file.
The return value of the C<require> is a package name (in this case,
the name of the main module. Use that to call the C<arguments> method.
lib/Module/Release.pm view on Meta::CPAN
=item get_release_date()
Return a string representing the current date and time (in UTC) in the
L<CPAN::Changes::Spec> format so that it can be added directly to the
Changes file.
=cut
sub get_release_date {
state $rc = require Time::Piece;
return Time::Piece->gmtime->datetime . 'Z';
}
=item run
Run a command in the shell.
=item run_error
Returns true if the command ran successfully, and false otherwise. Use
lib/Module/Release/MetaCPAN.pm view on Meta::CPAN
=over 4
=item * cpan_version()
Return the version of the module on CPAN.
=cut
sub _metacpan {
state $rc = require MetaCPAN::Client;
state $mcpan = MetaCPAN::Client->new;
$mcpan;
}
sub cpan_version {
my $self = shift;
# One reason for failure is that this is a new module not yet
( run in 0.403 second using v1.01-cache-2.11-cpan-0d8aa00de5b )