File: Makefile.PL

package info (click to toggle)
libapp-nopaste-perl 1.012-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 456 kB
  • sloc: perl: 1,334; makefile: 2
file content (140 lines) | stat: -rw-r--r-- 4,141 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012.
use strict;
use warnings;

use 5.008003;

use ExtUtils::MakeMaker;

my %WriteMakefileArgs = (
  "ABSTRACT" => "Easy access to any pastebin",
  "AUTHOR" => "Shawn M Moore, <sartak\@gmail.com>",
  "CONFIGURE_REQUIRES" => {
    "CPAN::Meta::Requirements" => "2.120620",
    "ExtUtils::MakeMaker" => 0,
    "Module::Metadata" => 0
  },
  "DISTNAME" => "App-Nopaste",
  "EXE_FILES" => [
    "script/nopaste"
  ],
  "LICENSE" => "perl",
  "MIN_PERL_VERSION" => "5.008003",
  "NAME" => "App::Nopaste",
  "PREREQ_PM" => {
    "Class::Load" => 0,
    "Exporter" => 0,
    "File::Spec" => 0,
    "File::Temp" => 0,
    "Getopt::Long::Descriptive" => 0,
    "JSON::MaybeXS" => 0,
    "LWP::UserAgent" => 0,
    "Module::Pluggable" => 0,
    "Module::Runtime" => 0,
    "POSIX" => 0,
    "Path::Tiny" => 0,
    "URI::Escape" => 0,
    "WWW::Mechanize" => 0,
    "namespace::clean" => "0.19",
    "parent" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "ExtUtils::MakeMaker" => 0,
    "File::Spec" => 0,
    "LWP::Protocol" => 0,
    "Test::Deep" => 0,
    "Test::Fatal" => 0,
    "Test::More" => "0.88"
  },
  "VERSION" => "1.012",
  "test" => {
    "TESTS" => "t/*.t"
  }
);


my %FallbackPrereqs = (
  "Class::Load" => 0,
  "Exporter" => 0,
  "ExtUtils::MakeMaker" => 0,
  "File::Spec" => 0,
  "File::Temp" => 0,
  "Getopt::Long::Descriptive" => 0,
  "JSON::MaybeXS" => 0,
  "LWP::Protocol" => 0,
  "LWP::UserAgent" => 0,
  "Module::Pluggable" => 0,
  "Module::Runtime" => 0,
  "POSIX" => 0,
  "Path::Tiny" => 0,
  "Test::Deep" => 0,
  "Test::Fatal" => 0,
  "Test::More" => "0.88",
  "URI::Escape" => 0,
  "WWW::Mechanize" => 0,
  "namespace::clean" => "0.19",
  "parent" => 0,
  "strict" => 0,
  "warnings" => 0
);

# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.034
requires('WWW::Pastebin::PastebinCom::Create', '1.003')
  if has_module('WWW::Pastebin::PastebinCom::Create', '1.003')
    || prompt('install pastebin.com support? [y/N]', 'N') =~ /^y/i;
requires('Clipboard')
  if has_module('Clipboard')
    || prompt('install copying of URLs with -x/--copy? [y/N]', 'N') =~ /^y/i;
requires('Browser::Open')
  if has_module('Browser::Open')
    || prompt('install opening of URLs in a browser with --open_url/--open/-o? [y/N]', 'N') =~ /^y/i;


unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
  delete $WriteMakefileArgs{TEST_REQUIRES};
  delete $WriteMakefileArgs{BUILD_REQUIRES};
  $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}

delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
  unless eval { ExtUtils::MakeMaker->VERSION(6.52) };

WriteMakefile(%WriteMakefileArgs);

# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.034
sub _add_prereq {
  my ($mm_key, $module, $version_or_range) = @_;
  $version_or_range ||= 0;
  warn "$module already exists in $mm_key (at version $WriteMakefileArgs{$mm_key}{$module}) -- need to do a sane metamerge!"
    if exists $WriteMakefileArgs{$mm_key}{$module}
      and $WriteMakefileArgs{$mm_key}{$module} ne '0'
      and $WriteMakefileArgs{$mm_key}{$module} ne $version_or_range;
  warn "$module already exists in FallbackPrereqs (at version $WriteMakefileArgs{$mm_key}{$module}) -- need to do a sane metamerge!"
    if exists $FallbackPrereqs{$module} and $FallbackPrereqs{$module} ne '0'
        and $FallbackPrereqs{$module} ne $version_or_range;
  $WriteMakefileArgs{$mm_key}{$module} = $FallbackPrereqs{$module} = $version_or_range;
  return;
}

sub has_module {
  my ($module, $version_or_range) = @_;
  require Module::Metadata;
  my $mmd = Module::Metadata->new_from_module($module);
  return undef if not $mmd;
  return $mmd->version($module) if not defined $version_or_range;

  require CPAN::Meta::Requirements;
  my $req = CPAN::Meta::Requirements->new;
  $req->add_string_requirement($module => $version_or_range);
  return 1 if $req->accepts_module($module => $mmd->version($module));
  return 0;
}

sub requires { goto &runtime_requires }

sub runtime_requires {
  my ($module, $version_or_range) = @_;
  _add_prereq(PREREQ_PM => $module, $version_or_range);
}