| 1 | package WWW::Asana::Tag; | ||||||||||||||
| 2 | 1 | ▶ | BEGIN { | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 3 | 1 | $WWW::Asana::Tag::AUTHORITY = 'cpan:GETTY'; | |||||||||||||
| 4 | } | ||||||||||||||
| 5 | { | ||||||||||||||
| 6 | 1 | $WWW::Asana::Tag::VERSION = '0.003'; | |||||||||||||
| 7 | } | ||||||||||||||
| 8 | # ABSTRACT: Asana Tag Class | ||||||||||||||
| 9 | |||||||||||||||
| 10 | 1 | ▶ | use MooX; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 11 | |||||||||||||||
| 12 | 1 | with 'WWW::Asana::Role::HasClient'; | |||||||||||||
| 13 | 1 | with 'WWW::Asana::Role::HasResponse'; | |||||||||||||
| 14 | 1 | with 'WWW::Asana::Role::NewFromResponse'; | |||||||||||||
| 15 | |||||||||||||||
| 16 | 1 | with 'WWW::Asana::Role::HasFollowers'; | |||||||||||||
| 17 | |||||||||||||||
| 18 | 1 | with 'WWW::Asana::Role::CanReload'; | |||||||||||||
| 19 | 1 | with 'WWW::Asana::Role::CanUpdate'; | |||||||||||||
| 20 | |||||||||||||||
| 21 | 0 | ▶ | sub own_base_args { 'tags', shift->id } | ||||||||||||
|
Subroutine
own_base_args: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 22 | |||||||||||||||
| 23 | 0 | ▶ | sub reload_base_args { 'Tag', 'GET' } | ||||||||||||
|
Subroutine
reload_base_args: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 24 | 0 | ▶ | sub update_args { | ||||||||||||
|
Subroutine
update_args: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 25 | 0 | my ( $self ) = @_; | |||||||||||||
| 26 | 0 | 'Tag', 'PUT', $self->own_base_args, $self->value_args; | |||||||||||||
| 27 | } | ||||||||||||||
| 28 | 0 | ▶ | sub create_args { | ||||||||||||
|
Subroutine
create_args: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 29 | 0 | my ( $self ) = @_; | |||||||||||||
| 30 | 0 | 'Tag', 'POST', 'tags', $self->value_args; | |||||||||||||
| 31 | } | ||||||||||||||
| 32 | 0 | ▶ | sub value_args { | ||||||||||||
|
Subroutine
value_args: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||
| 33 | 0 | my ( $self ) = @_; | |||||||||||||
| 34 | return { | ||||||||||||||
| 35 | 0 | ▶ | workspace => $self->workspace->id, | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 36 | $self->has_name ? ( name => $self->name ) : (), | ||||||||||||||
| 37 | $self->has_notes ? ( notes => $self->notes ) : (), | ||||||||||||||
| 38 | }; | ||||||||||||||
| 39 | } | ||||||||||||||
| 40 | |||||||||||||||
| 41 | 1 | has id => ( | |||||||||||||
| 42 | is => 'ro', | ||||||||||||||
| 43 | predicate => 1, | ||||||||||||||
| 44 | ); | ||||||||||||||
| 45 | |||||||||||||||
| 46 | 1 | has name => ( | |||||||||||||
| 47 | is => 'rw', | ||||||||||||||
| 48 | predicate => 1, | ||||||||||||||
| 49 | ); | ||||||||||||||
| 50 | |||||||||||||||
| 51 | 1 | has notes => ( | |||||||||||||
| 52 | is => 'rw', | ||||||||||||||
| 53 | predicate => 1, | ||||||||||||||
| 54 | ); | ||||||||||||||
| 55 | |||||||||||||||
| 56 | has created_at => ( | ||||||||||||||
| 57 | is => 'ro', | ||||||||||||||
| 58 | 0 | ▶ | isa => sub { | ||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||
| 59 | 0 | ▶ | die "created_at must be a DateTime" unless ref $_[0] eq 'DateTime'; | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 60 | }, | ||||||||||||||
| 61 | 1 | predicate => 1, | |||||||||||||
| 62 | ); | ||||||||||||||
| 63 | |||||||||||||||
| 64 | has workspace => ( | ||||||||||||||
| 65 | is => 'ro', | ||||||||||||||
| 66 | 0 | ▶ | isa => sub { | ||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||
| 67 | 0 | ▶ | die "workspace must be a WWW::Asana::Workspace" unless ref $_[0] eq 'WWW::Asana::Workspace'; | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 68 | }, | ||||||||||||||
| 69 | 1 | required => 1, | |||||||||||||
| 70 | ); | ||||||||||||||
| 71 | |||||||||||||||
| 72 | 1 | 1; | |||||||||||||
| 73 | |||||||||||||||
| 74 | __END__ | ||||||||||||||