-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.PL
44 lines (38 loc) · 1.22 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
use strict;
use warnings;
use ExtUtils::MakeMaker;
use File::Basename;
if (-f 'oaf') {
open my $in, '<', 'oaf' or die $!;
open my $out, '>', 'bin/oaf' or die $!;
# Fixup for MakeMaker to replace with system path
while (<$in>) {
s|^#!/usr/bin/env perl|#!perl|;
print $out $_;
}
close $in;
close $out;
}
WriteMakefile(
NAME => 'App::oaf',
VERSION_FROM => 'bin/oaf',
ABSTRACT_FROM => 'lib/App/oaf.pm',
AUTHOR => 'Skye Shaw <skye.shaw AT gmail.com>',
LICENSE => 'perl',
EXE_FILES => ['bin/oaf'],
(eval { ExtUtils::MakeMaker->VERSION(6.46) } ?
(META_MERGE => { resources => { bugtracker => 'http://github.com/sshaw/output-as-format/issues',
repository => 'http://github.com/sshaw/output-as-format',
homepage => 'http://github.com/sshaw/output-as-format'} }) : ())
);
# 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->{ABSTRACT_FROM}
\@perldoc -uT $self->{ABSTRACT_FROM} > README.pod
END_MAKE
}