line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::New::License; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
16188
|
use strict; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
242
|
|
4
|
7
|
|
|
7
|
|
65
|
use warnings; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
167
|
|
5
|
7
|
|
|
7
|
|
28
|
use Carp; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
405
|
|
6
|
7
|
|
|
7
|
|
429
|
use Sub::Install 'reinstall_sub'; |
|
7
|
|
|
|
|
1256
|
|
|
7
|
|
|
|
|
40
|
|
7
|
7
|
|
|
7
|
|
3658
|
use Module::Find; |
|
7
|
|
|
|
|
6940
|
|
|
7
|
|
|
|
|
1031
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my %LICENSES; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub _install_dsl { |
12
|
7
|
|
|
7
|
|
13
|
my $class = shift; |
13
|
|
|
|
|
|
|
|
14
|
7
|
50
|
|
|
|
22
|
return if $class eq 'main'; |
15
|
7
|
50
|
|
|
|
20
|
return if $class =~ /^Test::/; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
reinstall_sub({ |
18
|
|
|
|
|
|
|
as => 'object', |
19
|
|
|
|
|
|
|
into => $class, |
20
|
|
|
|
|
|
|
code => sub { |
21
|
22
|
|
|
22
|
|
1518
|
my ($self, $type, $args) = @_; |
|
|
|
|
0
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
22
|
100
|
|
|
|
275
|
croak "unknown license type: $type" unless $LICENSES{$type}; |
24
|
21
|
|
|
|
|
324
|
$LICENSES{$type}->new($args); |
25
|
|
|
|
|
|
|
} |
26
|
7
|
|
|
|
|
47
|
}); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
7
|
|
|
7
|
|
15
|
BEGIN { _install_dsl(__PACKAGE__); } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub import { |
32
|
16
|
|
|
16
|
|
44
|
my ($class, $flag) = @_; |
33
|
|
|
|
|
|
|
|
34
|
16
|
50
|
33
|
|
|
115
|
_install_dsl(caller) if $flag && $flag eq 'base'; |
35
|
|
|
|
|
|
|
|
36
|
16
|
|
|
|
|
69
|
for my $module (sort {$b cmp $a} usesub 'Software::License') { |
|
1616
|
|
|
|
|
401075
|
|
37
|
448
|
50
|
|
|
|
3811
|
next unless $module->can('meta_name'); |
38
|
448
|
|
66
|
|
|
1352
|
$LICENSES{$module->meta_name} ||= $module; |
39
|
448
|
|
66
|
|
|
2334
|
$LICENSES{$module->meta2_name} ||= $module; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |