| 1 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 1 | ▶ | use ExtUtils::MM (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use File::Spec::Functions qw( catfile ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | my $git_base_url = 'https://codeberg.org/XSven'; | |||||||||
| 8 | 1 | my $distname = 'Getopt-Guided'; | |||||||||
| 9 | |||||||||||
| 10 | 1 | my @main_module_namespace = split /-/, $distname; | |||||||||
| 11 | 1 | my $main_module = join '::', @main_module_namespace; | |||||||||
| 12 | 1 | my $main_module_file = catfile( 'lib', @main_module_namespace ) . '.pm'; | |||||||||
| 13 | 1 | my $main_module_podfile = catfile( 'lib', @main_module_namespace ) . '.pod'; | |||||||||
| 14 | # We are not using | ||||||||||
| 15 | # VERSION_FROM => $main_module_file | ||||||||||
| 16 | # because we have to set the main module version in META_MERGE/provides too | ||||||||||
| 17 | 1 | my $main_module_version = MM->parse_version( $main_module_file ); | |||||||||
| 18 | |||||||||||
| 19 | my %att = ( | ||||||||||
| 20 | NAME => $main_module, | ||||||||||
| 21 | AUTHOR => 'Sven Willenbuecher <sven.willenbuecher@gmx.de>', | ||||||||||
| 22 | VERSION => $main_module_version, | ||||||||||
| 23 | ABSTRACT_FROM => $main_module_podfile, | ||||||||||
| 24 | # Another valid license string is "restricted" | ||||||||||
| 25 | # https://metacpan.org/pod/CPAN::Meta::Spec#license | ||||||||||
| 26 | LICENSE => 'perl_5', | ||||||||||
| 27 | MIN_PERL_VERSION => '5.010000', | ||||||||||
| 28 | DISTNAME => $distname, | ||||||||||
| 29 | 1 | EXE_FILES => [ glob( join( ' ', map { catfile( $_, '*' ) } qw( bin script ) ) ) ], | |||||||||
| 30 | META_MERGE => { | ||||||||||
| 31 | 'meta-spec' => { version => 2 }, | ||||||||||
| 32 | provides => { | ||||||||||
| 33 | $main_module => { | ||||||||||
| 34 | file => $main_module_file, | ||||||||||
| 35 | version => $main_module_version | ||||||||||
| 36 | } | ||||||||||
| 37 | }, | ||||||||||
| 38 | resources => { | ||||||||||
| 39 | repository => { | ||||||||||
| 40 | type => 'git', | ||||||||||
| 41 | url => "$git_base_url/$distname.git", | ||||||||||
| 42 | web => "$git_base_url/$distname" | ||||||||||
| 43 | }, | ||||||||||
| 44 | bugtracker => { | ||||||||||
| 45 | web => "$git_base_url/$distname/issues" | ||||||||||
| 46 | } | ||||||||||
| 47 | } | ||||||||||
| 48 | }, | ||||||||||
| 49 | # Check ExtUtils::MakeMaker Changes | ||||||||||
| 50 | NORECURS => 1, | ||||||||||
| 51 | NO_PERLLOCAL => 1, | ||||||||||
| 52 | clean => { FILES => "$distname*" }, | ||||||||||
| 53 | dist => { TARFLAGS => 'cf', COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, | ||||||||||
| 54 | realclean => { FILES => 'cover_db local' }, | ||||||||||
| 55 | test => { RECURSIVE_TEST_FILES => 1 } | ||||||||||
| 56 | ); | ||||||||||
| 57 | |||||||||||
| 58 | 1 | ▶ | if ( caller() ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 59 | *WriteMakefile = sub { | ||||||||||
| 60 | 1 | ▶ | my %args = @_; | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.2
| |||||||||||
| 61 | 1 | ▶ | @ARGV ? [ @args{ @ARGV } ] : \%args | ||||||||
|
Branch: 1 branch
| |||||||||||
| 62 | } | ||||||||||
| 63 | 1 | } else { | |||||||||
| 64 | 0 | require ExtUtils::MakeMaker::CPANfile; | |||||||||
| 65 | 0 | ExtUtils::MakeMaker::CPANfile->import | |||||||||
| 66 | } | ||||||||||
| 67 | 1 | WriteMakefile( %att ) | |||||||||