line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package WWW::Kickstarter::Data::Category; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
5
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
17
|
|
6
|
1
|
|
|
1
|
|
2
|
no autovivification; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
4
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
35
|
use WWW::Kickstarter::Data qw( ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
12
|
|
10
|
1
|
|
|
1
|
|
3
|
use WWW::Kickstarter::Error qw( my_croak ); |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
389
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our @ISA = 'WWW::Kickstarter::Data'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _new { |
17
|
0
|
0
|
|
0
|
|
|
my_croak(400, "Incorrect usage") if @_ < 3; |
18
|
0
|
|
|
|
|
|
my ($class, $ks, $data, %opts) = @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
0
|
|
|
|
|
if (my @unrecognized = keys(%opts)) { |
21
|
0
|
|
|
|
|
|
my_croak(400, "Unrecognized parameters @unrecognized"); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my $self = $class->SUPER::_new($ks, $data); |
25
|
0
|
|
|
|
|
|
$self->{_}{subcategories} = undef; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
return $self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
|
|
sub _set_subcategories { my $self = shift; $self->{_}{subcategories} = [ @_ ]; } |
|
0
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub id { $_[0]{id} } |
35
|
0
|
|
|
0
|
1
|
|
sub slug { $_[0]{slug} } |
36
|
0
|
|
|
0
|
1
|
|
sub name { $_[0]{name} } |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub subcategories { |
40
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
41
|
|
|
|
|
|
|
my $subcategories = $self->{_}{subcategories} |
42
|
0
|
0
|
|
|
|
|
or my_croak(400, "The list of subcategories is only avaiable for Category objects created by \$ks->categories()"); |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
return @$subcategories; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
0
|
1
|
|
sub refetch { my $self = shift; return $self->ks->category($self->id, @_); } |
|
0
|
|
|
|
|
|
|
49
|
0
|
|
|
0
|
1
|
|
sub projects { my $self = shift; return $self->ks->category_projects($self->id, @_); } |
|
0
|
|
|
|
|
|
|
50
|
0
|
|
|
0
|
1
|
|
sub projects_recommended { my $self = shift; return $self->ks->category_projects_recommended($self->id, @_); } |
|
0
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |