line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Toodledo::Context; |
2
|
1
|
|
|
1
|
|
1512
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
45
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
66
|
|
8
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
9
|
1
|
|
|
1
|
|
7097
|
use MooseX::Method::Signatures; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
12
|
|
10
|
1
|
|
|
1
|
|
171
|
use App::Toodledo::ContextInternal; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
7
|
use Moose::Util::TypeConstraints; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
12
|
|
13
|
1
|
|
|
1
|
|
2106
|
BEGIN { class_type 'App::Toodledo' }; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
extends 'App::Toodledo::InternalWrapper'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has object => ( is => 'ro', isa => 'App::Toodledo::ContextInternal', |
18
|
|
|
|
|
|
|
default => sub { App::Toodledo::ContextInternal->new }, |
19
|
|
|
|
|
|
|
handles => sub { __PACKAGE__->internal_attributes( $_[1] ) } ); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
61740
|
method add ( App::Toodledo $todo! ) { |
23
|
|
|
|
|
|
|
my $added_ref = $todo->call_func( context => add => { name => $self->name } ); |
24
|
|
|
|
|
|
|
$added_ref->[0]{id}; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
App::Toodledo::Context - class encapsulating a Toodledo context |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
$context = App::Toodledo::Context->new; |
39
|
|
|
|
|
|
|
$context->name( 'Uraguay' ) |
40
|
|
|
|
|
|
|
$todo = App::Toodledo->new; |
41
|
|
|
|
|
|
|
$todo->add_context( $context ); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 DESCRIPTION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
This class provides accessors for the properties of a Toodledo context. |
46
|
|
|
|
|
|
|
The attributes of a context are defined in the L<App::Toodledo::ContextRole> |
47
|
|
|
|
|
|
|
module. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 AUTHOR |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Peter J. Scott, C<< <cpan at psdt.com> >> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SEE ALSO |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Toodledo: L<http://www.toodledo.com/>. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Toodledo API documentation: L<http://www.toodledo.com/info/api_doc.php>. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Copyright 2009-2011 Peter J. Scott, all rights reserved. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
64
|
|
|
|
|
|
|
under the same terms as Perl itself. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |