p5-app-cpantimes / Makefile.PL

=for developers

If you're a developer, Makefile.PL will pack `cpanm` from
script/cpanm.PL and then copy that file to `bin/cpanm`.

You can pretend to be an author by running it with:

  perl Makefile.PL --author

You should install local::lib, Parse::CPAN::Meta, Module::Metadata,
App::FatPacker and HTTP::Tiny before doing so.

Do not commit the changes to `cpanm` standalone executable. We only
commit changes to this file whenever we tag a new CPAN release.

=cut

my $author = ((grep{ $_ eq '--author' } @ARGV) or -d '.git' && `git remote -v` =~ /git\@github/);
print STDERR "Running as an author mode!\n" if $author;

# Author: perl Makefile.PL packs 'script/cpanm.PL' -> 'cpanm'
if ($author) {
	shift @ARGV;
	system $^X, "script/build.PL" and die $?;
}

# perl Makefile.PL (from git repo) copies 'cpanm' -> 'bin/cpanm'
if (-e 'cpant') {
	print STDERR "Generating bin/cpant from cpant\n";
	open my $in,  "<cpant"     or die $!;
	open my $out, ">bin/cpant" or die $!;
	while (<$in>) {
		s|^#!/usr/bin/env perl|#!perl|; # so MakeMaker can fix it
		print $out $_
	}
}

use ExtUtils::MakeMaker;

my %args = (
	NAME => 'App::cpantimes',
	VERSION_FROM => "lib/App/cpantimes.pm",
	ABSTRACT => 'Get, unpack, build, install and report on modules from CPAN.',
	PREREQ_PM => {
		'Module::Build' => 0.36,
		'ExtUtils::MakeMaker' => 6.31,
		'ExtUtils::Install' => 1.46,
	},
	LICENSE => 'perl',
	EXE_FILES => [ 'bin/cpant' ],
);

my $eummv = eval ($ExtUtils::MakeMaker::VERSION);
if ($eummv >= 6.45) {
    $args{META_MERGE} = {
        resources => {
            repository => 'https://bitbucket.org/tobyink/p5-app-cpantimes',
            bugtracker => 'https://rt.cpan.org/Ticket/Create.html?Queue=App-cpantimes',
        },
    };
}

WriteMakefile(%args);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.