blib/lib/Module/Install/Bundle/Platypus.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package Module::Install::Bundle::Platypus;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 our $VERSION = '0.00002';
7  
8 1 ▶use base qw(Module::Install::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 sub bundle_platypus {
11 my ($self, %args) = @_;
12  
13  
14 my $class = delete $args{class} || 'App::BundleDeps::Platypus';
15 foreach my $required qw(script) {
16 die "required parameter $required not specified in bundle_platypus"
17 unless $args{$required};
18 }
19 $args{version} ||= $self->version() ||
20 die "could not guess version for bundle_platypus";
21  
22 $args{extlib} ||= 'extlib';
23  
24 local $Data::Dumper::Indent = 0;
25 local $Data::Dumper::Varname = "MIBP_VAR";
26 local $Data::Dumper::Useqq = 1;
27 my $args = Dumper(\%args);
28 $args =~ s/^\s*\$MIBP_VAR\d+\s*=\s*{//;
29 $args =~ s/}\s*;?\s*$//;
30  
31 $self->Makefile->postamble(<<EOM);
32 platypus: metafile
33 \t\$(FULLPERLRUN) -M$class -e '$class->new($args)->bundle_from_meta()'
34 EOM
35 }
36  
37 1;
38  
39 __END__
↑ Summary