line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::New::License;
|
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
12989
|
use strict;
|
|
7
|
|
|
|
|
36
|
|
|
7
|
|
|
|
|
204
|
|
4
|
7
|
|
|
7
|
|
24
|
use warnings;
|
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
123
|
|
5
|
7
|
|
|
7
|
|
21
|
use Carp;
|
|
7
|
|
|
|
|
5
|
|
|
7
|
|
|
|
|
307
|
|
6
|
7
|
|
|
7
|
|
383
|
use Sub::Install 'reinstall_sub';
|
|
7
|
|
|
|
|
1071
|
|
|
7
|
|
|
|
|
36
|
|
7
|
7
|
|
|
7
|
|
3063
|
use Module::Find;
|
|
7
|
|
|
|
|
5724
|
|
|
7
|
|
|
|
|
863
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my %LICENSES;
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub _install_dsl {
|
12
|
7
|
|
|
7
|
|
9
|
my $class = shift;
|
13
|
|
|
|
|
|
|
|
14
|
7
|
50
|
|
|
|
18
|
return if $class eq 'main';
|
15
|
7
|
50
|
|
|
|
16
|
return if $class =~ /^Test::/;
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
reinstall_sub({
|
18
|
|
|
|
|
|
|
as => 'object',
|
19
|
|
|
|
|
|
|
into => $class,
|
20
|
|
|
|
|
|
|
code => sub {
|
21
|
22
|
|
|
22
|
|
1900
|
my ($self, $type, $args) = @_;
|
22
|
|
|
|
|
|
|
|
23
|
22
|
100
|
|
|
|
209
|
croak "unknown license type: $type" unless $LICENSES{$type};
|
24
|
21
|
|
|
|
|
169
|
$LICENSES{$type}->new($args);
|
25
|
|
|
|
|
|
|
}
|
26
|
7
|
|
|
|
|
42
|
});
|
27
|
|
|
|
|
|
|
}
|
28
|
|
|
|
|
|
|
|
29
|
7
|
|
|
7
|
|
18
|
BEGIN { _install_dsl(__PACKAGE__); }
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub import {
|
32
|
16
|
|
|
16
|
|
29
|
my ($class, $flag) = @_;
|
33
|
|
|
|
|
|
|
|
34
|
16
|
50
|
33
|
|
|
54
|
_install_dsl(caller) if $flag && $flag eq 'base';
|
35
|
|
|
|
|
|
|
|
36
|
16
|
|
|
|
|
53
|
for my $module (sort {$b cmp $a} usesub 'Software::License') {
|
|
1616
|
|
|
|
|
336847
|
|
37
|
448
|
50
|
|
|
|
2946
|
next unless $module->can('meta_name');
|
38
|
448
|
|
66
|
|
|
1051
|
$LICENSES{$module->meta_name} ||= $module;
|
39
|
448
|
|
66
|
|
|
1859
|
$LICENSES{$module->meta2_name} ||= $module;
|
40
|
|
|
|
|
|
|
}
|
41
|
|
|
|
|
|
|
}
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1;
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__
|