| 1 | package WWW::Asana::Role::CanCreate; | ||||||||||
| 2 | 1 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | $WWW::Asana::Role::CanCreate::AUTHORITY = 'cpan:GETTY'; | |||||||||
| 4 | } | ||||||||||
| 5 | { | ||||||||||
| 6 | 1 | $WWW::Asana::Role::CanCreate::VERSION = '0.003'; | |||||||||
| 7 | } | ||||||||||
| 8 | # ABSTRACT: Role for Asana classes which can be created | ||||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | use MooX::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 1 | requires qw( | |||||||||
| 13 | create_args | ||||||||||
| 14 | ); | ||||||||||
| 15 | |||||||||||
| 16 | 0 | ▶ | sub create { | ||||||||
|
Subroutine
create: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 17 | 0 | my $self = shift; | |||||||||
| 18 | 0 | ▶ | die "The object already has an id, and so cant be created" if $self->has_id; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 0 | $self->do($self->create_args(@_)); | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 1 | 1; | |||||||||
| 23 | __END__ | ||||||||||