CPAN-Audit
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
package CPAN::Audit;
use strict;
use warnings;
=encoding utf8
=head1 The build file for CPAN::Audit
This build file is a modulino; it works as both a build script and
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.
Even if this distribution needs a higher version of Perl, this bit
only needs v5.8. You can play with the data structure with a primitive
Perl.
=cut
BEGIN {
use ExtUtils::MM_Any;
no warnings qw(redefine);
# get rid of the warning about README.pod, because I'm using it.
# It's also in INSTALL.SKIP
sub ExtUtils::MM_Any::libscan {
my($self,$path) = @_;
my($dirs,$file) = ($self->splitpath($path))[1,2];
return '' if grep /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/,
$self->splitdir($dirs), $file;
return $path;
}
}
use File::Spec::Functions qw(catfile);
my $module = __PACKAGE__;
( my $dist = $module ) =~ s/::/-/g;
my $github = 'https://github.com/briandfoy/cpan-audit';
my $main_file = catfile( 'lib', split /::/, "$module.pm" );
my $advisory_repo = 'git@github.com:briandfoy/cpan-security-advisory.git';
sub MY::postamble {
my $file = __FILE__;
return <<"POSTAMBLE";
######################################################################
# Postamble from $file
cpan-security-advisory:
\t- git submodule add $advisory_repo
cpan-security-advisory/LICENSE: submodules
.PHONY: submodules
submodules: cpan-security-advisory
\t- git submodule init
\tgit submodule update --remote
( run in 0.568 second using v1.01-cache-2.11-cpan-995e09ba956 )