lib/LEOCHARRE/Dev/Distribution.pm

filter: Statementstmt 77.7% 7 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 10 / 12 CC 1 SCAR 0.9
CC
1
Cov
78%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« lib/LEOCHARRE/DEBUG2.pm ↑ Summary
1 package LEOCHARRE::Dev::Distribution;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use LEOCHARRE::Class2;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 0 ▶use LEOCHARRE::Dev;
Subroutine BEGIN: called CC=1 SCAR=2.6
5  
6  
7 __PACKAGE__->make_accessor_setget_ondisk_dir('abs_path');
8  
9 __PACKAGE__->make_accessor_setget(qw(
10 abs_makefile
11 abs_manifest
12 name
13 version_from
14 ls_manifest
15 code_manifest
16 version
17 ));
18  
19 __PACKAGE__->make_constructor_init;
20  
21 sub init {
22 my $self = shift;
23  
24 $self->abs_path or die("Missing abs_path\n");
25 LEOCHARRE::Dev::is_pmdist($self->abs_path) or die;
26  
27 $self->name( LEOCHARRE::Dev::pmdist_guess_name($self->abs_path) ) or die("can't guess name");
28 $self->version_from( LEOCHARRE::Dev::pmdist_guess_version_from($self->abs_path) ) or die;
29 $self->abs_makefile($self->abs_path.'/Makefile.PL');
30 $self->abs_manifest($self->abs_path.'/MANIFEST'); # of if not there
31  
32 my @lsm = grep { defined } LEOCHARRE::Dev::ls_pmdist($self->abs_path);
33 $self->ls_manifest( \@lsm );
34 $self->code_manifest( join( "\n", @lsm ) );
35  
36  
37 }
38  
39  
40  
41  
42 sub reset_manifest {
43 my $self = shift;
44 open(FILE, '>', $self->abs_manifest ) or die;
45 print FILE $self->code_manifest;
46 close FILE;
47 return $self->code_manifest;
48 }
49  
50  
51  
52  
53  
54 1;
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
« lib/LEOCHARRE/DEBUG2.pm ↑ Summary