line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Lighthouse; |
2
|
|
|
|
|
|
|
|
3
|
11
|
|
|
11
|
|
4444
|
use MIME::Base64; |
|
11
|
|
|
|
|
2063
|
|
|
11
|
|
|
|
|
992
|
|
4
|
11
|
|
|
11
|
|
1241
|
use LWP::UserAgent; |
|
11
|
|
|
|
|
50658
|
|
|
11
|
|
|
|
|
293
|
|
5
|
11
|
|
|
11
|
|
3191
|
use Params::Validate ':all'; |
|
11
|
|
|
|
|
296126
|
|
|
11
|
|
|
|
|
2715
|
|
6
|
11
|
|
|
11
|
|
3795
|
use Net::Lighthouse::Project; |
|
11
|
|
|
|
|
27
|
|
|
11
|
|
|
|
|
326
|
|
7
|
11
|
|
|
11
|
|
7234
|
use Net::Lighthouse::Token; |
|
11
|
|
|
|
|
31
|
|
|
11
|
|
|
|
|
426
|
|
8
|
11
|
|
|
11
|
|
7312
|
use Net::Lighthouse::User; |
|
11
|
|
|
|
|
32
|
|
|
11
|
|
|
|
|
420
|
|
9
|
11
|
|
|
11
|
|
83
|
use base 'Net::Lighthouse::Base'; |
|
11
|
|
|
|
|
109
|
|
|
11
|
|
|
|
|
7516
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.06'; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
1
|
2063
|
sub project { return shift->_new( 'Project' ) } |
14
|
1
|
|
|
1
|
1
|
865
|
sub user { return shift->_new( 'User' ) } |
15
|
1
|
|
|
1
|
1
|
790
|
sub token { return shift->_new( 'Token' ) } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _new { |
18
|
3
|
|
|
3
|
|
5
|
my $self = shift; |
19
|
3
|
|
|
|
|
60
|
validate_pos( |
20
|
|
|
|
|
|
|
@_, |
21
|
|
|
|
|
|
|
{ |
22
|
|
|
|
|
|
|
type => SCALAR, |
23
|
|
|
|
|
|
|
regex => qr/^(Project|Token|User)$/, |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
); |
26
|
3
|
|
|
|
|
39
|
my $class = 'Net::Lighthouse::' . shift; |
27
|
6
|
|
|
|
|
46
|
my $object = $class->new( |
28
|
6
|
|
|
|
|
35
|
map { $_ => $self->$_ } |
29
|
3
|
|
|
|
|
9
|
grep { $self->$_ } qw/account auth/ |
30
|
|
|
|
|
|
|
); |
31
|
3
|
|
|
|
|
362
|
return $object; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub projects { |
35
|
1
|
|
|
1
|
1
|
961
|
my $self = shift; |
36
|
2
|
|
|
|
|
22
|
my $object = Net::Lighthouse::Project->new( |
37
|
2
|
|
|
|
|
10
|
map { $_ => $self->$_ } |
38
|
1
|
|
|
|
|
3
|
grep { $self->$_ } qw/account auth/ |
39
|
|
|
|
|
|
|
); |
40
|
1
|
|
|
|
|
8
|
return $object->list(@_); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |