line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dist::Zooky::License; |
2
|
|
|
|
|
|
|
$Dist::Zooky::License::VERSION = '0.24'; |
3
|
|
|
|
|
|
|
# ABSTRACT: license objects for Dist::Zooky |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
705
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
46
|
|
7
|
1
|
|
|
1
|
|
383
|
use Module::Pluggable search_path => 'Software::License', except => qr/(Custom)$/; |
|
1
|
|
|
|
|
7941
|
|
|
1
|
|
|
|
|
9
|
|
8
|
1
|
|
|
1
|
|
485
|
use Class::Load (); |
|
1
|
|
|
|
|
9909
|
|
|
1
|
|
|
|
|
28
|
|
9
|
1
|
|
|
1
|
|
423
|
use Moose; |
|
1
|
|
|
|
|
382706
|
|
|
1
|
|
|
|
|
8
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'metaname' => ( |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
isa => 'Str', |
14
|
|
|
|
|
|
|
required => 1, |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has 'license' => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
isa => 'ArrayRef[Software::License]', |
20
|
|
|
|
|
|
|
lazy => 1, |
21
|
|
|
|
|
|
|
builder => '_build_license', |
22
|
|
|
|
|
|
|
init_arg => undef, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _build_license { |
26
|
3
|
|
|
3
|
|
4
|
my $self = shift; |
27
|
3
|
|
|
|
|
6
|
my @licenses; |
28
|
3
|
|
|
|
|
10
|
foreach my $plugin ( $self->plugins ) { |
29
|
0
|
|
|
|
|
0
|
Class::Load::load_class( $plugin ); |
30
|
0
|
|
|
|
|
0
|
my $license; |
31
|
0
|
|
|
|
|
0
|
eval { |
32
|
0
|
|
|
|
|
0
|
$license = $plugin->new({ holder => 'noddy' }); # need to set holder |
33
|
|
|
|
|
|
|
}; |
34
|
0
|
0
|
|
|
|
0
|
next if $@; |
35
|
0
|
0
|
0
|
|
|
0
|
push @licenses, $license |
36
|
|
|
|
|
|
|
if $license->meta2_name eq $self->metaname |
37
|
|
|
|
|
|
|
or $license->meta_name eq $self->metaname; |
38
|
|
|
|
|
|
|
} |
39
|
3
|
|
|
|
|
1023
|
return \@licenses; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
43
|
1
|
|
|
1
|
|
6716
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
qq[Licenses]; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=encoding UTF-8 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 NAME |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Dist::Zooky::License - license objects for Dist::Zooky |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 VERSION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
version 0.24 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 AUTHOR |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Chris Williams <chris@bingosnet.co.uk> |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Chris Williams. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
70
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |