File: Makefile.PL

package info (click to toggle)
libcarp-clan-share-perl 0.013-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 204 kB
  • sloc: perl: 1,270; makefile: 2
file content (38 lines) | stat: -rw-r--r-- 979 bytes parent folder | download | duplicates (2)
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
use lib '.';
use inc::Module::Install;

name     'Carp-Clan-Share';
all_from 'lib/Carp/Clan/Share.pm';
author   'Robert Krimen <rkrimen@cpan.org>';

resources repository => 'http://github.com/robertkrimen/Carp-Clan-Share/tree/master';

{
    require ExtUtils::MakeMaker;
    use strict;
    no strict 'refs';

    my $libscan = \&{"ExtUtils::MM_Any::libscan"};
    *{"ExtUtils::MM_Any::libscan"} = sub {
        return '' unless $libscan->(@_);
        return '' if $_[1] =~ /\.sw[p-z]$/;
        return $_[1];
    };
}

{
    map { my ($pk, $vr) = split m/\s/; build_requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
Test::More
_END_

    map { my ($pk, $vr) = split m/\s/; requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
Carp::Clan
_END_
}

if (-e 'inc/.author') {
    my $all_from = join '/', 'lib', split m/-/, name . '.pm';
    `perldoc -tF $all_from > README` if ! -e 'README' || (stat $all_from)[9] > (stat 'README')[9];
}

WriteAll;