=================================================================== RCS file: /cvs/todotxt/Text-Todo-REST-API/lib/Text/Todo/REST/API/Attic/md5.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- todotxt/Text-Todo-REST-API/lib/Text/Todo/REST/API/Attic/md5.pm 2010/01/16 16:01:07 1.1 +++ todotxt/Text-Todo-REST-API/lib/Text/Todo/REST/API/Attic/md5.pm 2010/01/17 23:15:00 1.2 @@ -1,22 +1,38 @@ package Text::Todo::REST::API::md5; -# $RedRiver$ +# $AFresh1$ +use base 'Text::Todo::REST::API'; +&Text::Todo::REST::API::RegisterFormatHandler(__PACKAGE__, 'md5'); + use warnings; use strict; use Carp; use version; our $VERSION = qv('0.0.1'); -# Other recommended modules (uncomment to use): -# use IO::Prompt; -# use Perl6::Export; -# use Perl6::Slurp; -# use Perl6::Say; +{ + sub Dump { + my ($self, @output) = @_; + my $action = $self->_action; - -# Module implementation here - + my $output; + if ($action eq 'files') { + $output .= $self->SUPER::Dump(@output); + #foreach my $o (@output) { + #} + } + elsif ($action eq 'list' || $action eq 'entry') { + foreach my $o (@output) { + $output .= "MD5 ($o->{text}) = $o->{md5}\n"; + } + } + else { + $output .= $self->SUPER::Dump(@output); + } + return $output; + } +} 1; # Magic true value required at end of module __END__