version 1.1, 2010/02/18 05:34:31 |
version 1.2, 2010/02/18 06:25:09 |
|
|
package Text::Todo::REST::API::Actions::PUT; |
package Text::Todo::REST::API::Actions::PUT; |
|
|
# $AFresh1: PUT.pm,v 1.5 2010/02/16 04:09:53 andrew Exp $ |
# $AFresh1: PUT.pm,v 1.1 2010/02/18 05:34:31 andrew Exp $ |
|
|
use warnings; |
use warnings; |
use strict; |
use strict; |
|
|
my ( $self, $todo, $options ) = @_; |
my ( $self, $todo, $options ) = @_; |
my $id = $options->{entry}; |
my $id = $options->{entry}; |
|
|
use Data::Dumper; |
|
print STDERR Dumper $options; |
|
my $new_text; |
my $new_text; |
VALUE: foreach my $k qw( text value ) { |
VALUE: foreach my $k qw( text value ) { |
if ( exists $options->{$k} ) { |
if ( exists $options->{$k} ) { |
|
|
} |
} |
|
|
if ($entry && $options->{md5}) { |
if ($entry && $options->{md5}) { |
warn md5_hex($entry->text) . '<>' . $options->{md5} . "($new_text)\n"; |
|
if (md5_hex($entry->text) ne lc($options->{md5})) { |
if (md5_hex($entry->text) ne lc($options->{md5})) { |
$entry = undef; |
$entry = undef; |
} |
} |