line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Asana::Role::HasFollowers; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
1
|
|
|
1
|
|
929
|
$WWW::Asana::Role::HasFollowers::AUTHORITY = 'cpan:GETTY'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$WWW::Asana::Role::HasFollowers::VERSION = '0.003'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
# ABSTRACT: Role for a class which has followers |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
9
|
use MooX::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has followers => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
isa => sub { |
15
|
|
|
|
|
|
|
die "followers must be an ArrayRef" unless ref $_[0] eq 'ARRAY'; |
16
|
|
|
|
|
|
|
die "followers must be an ArrayRef of WWW::Asana::User" if grep { ref $_ ne 'WWW::Asana::User' } @{$_[0]}; |
17
|
|
|
|
|
|
|
}, |
18
|
|
|
|
|
|
|
predicate => 'has_followers', |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
__END__ |