Changeset 1175 for lang/perl/Net-Wassr
- Timestamp:
- 11/06/07 11:49:07 (6 years ago)
- Location:
- lang/perl/Net-Wassr/trunk
- Files:
-
- 2 modified
-
Makefile.PL (modified) (1 diff)
-
lib/Net/Wassr/TODO.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Net-Wassr/trunk/Makefile.PL
r1166 r1175 8 8 requires 'autobox'; 9 9 requires 'autobox::Core'; 10 requires 'Module::Compile::TT'; 10 11 11 12 build_requires 'Test::More'; -
lang/perl/Net-Wassr/trunk/lib/Net/Wassr/TODO.pm
r1173 r1175 52 52 } 53 53 54 sub done { 54 use tt methods => [qw/done delete start stop/]; 55 [% FOR method IN methods %] 56 sub [% method %] { 55 57 my ($self, $todo_rid) = @_; 56 58 57 my $res = $self->{ua}->post("$BASE_URL/ done.json", [todo_rid => $todo_rid]);59 my $res = $self->{ua}->post("$BASE_URL/[% method %].json", [todo_rid => $todo_rid]); 58 60 if ($res->is_success) { 59 61 return $res->content; … … 62 64 } 63 65 } 64 65 sub delete { 66 my ($self, $todo_rid) = @_; 67 68 my $res = $self->{ua}->post("$BASE_URL/delete.json", [todo_rid => $todo_rid]); 69 if ($res->is_success) { 70 return $res->content; 71 } else { 72 croak $res->status_line; 73 } 74 } 66 [% END %] 67 no tt; 75 68 76 69 sub add {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)