-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.PL
47 lines (40 loc) · 1.44 KB
/
Makefile.PL
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
use ExtUtils::MakeMaker;
my $found;
my @modz = qw|Crypt::OpenSSL::Random Crypt::URandom|;
for(@modz) {
if(eval "require $_; 1") {
$found = 1;
last;
}
}
unless($found) {
warn<<END;
Neither $modz[0] or $modz[1] are installed. In order to generate a secret
you must install one of these modules or, when running the command, specify an alternate
generator via the `-g` option.
See `mojo secret --help` for more info.
END
}
WriteMakefile(
NAME => 'Mojolicious::Command::secret',
AUTHOR => 'Skye Shaw <skye.shaw AT gmail.com>',
VERSION_FROM => 'lib/Mojolicious/Command/secret.pm',
ABSTRACT_FROM => 'lib/Mojolicious/Command/secret.pm',
PREREQ_PM => { 'Mojolicious' => '4.63' },
LICENSE => 'perl',
(eval { ExtUtils::MakeMaker->VERSION(6.46) } ?
(META_MERGE => { resources => { bugtracker => 'http://github.com/sshaw/Mojolicious-Command-secret/issues',
repository => 'http://github.com/sshaw/Mojolicious-Command-secret',
homepage => 'http://github.com/sshaw/Mojolicious-Command-secret'} }) : ())
);
# Create README.pod for a repo's GitHub page. Unlike CPAN, GitHub won't
# display the module's POD, it looks for a README.*
sub MY::postamble
{
my $self = shift;
return if -r 'README' or ! -r $self->{VERSION_FROM};
return<<END_MAKE;
README.pod: $self->{VERSION_FROM}
\@perldoc -uT $self->{VERSION_FROM} > README.pod
END_MAKE
}