Annotation of todotxt/Text-Todo-REST-API/lib/Text/Todo/REST/API/Representations/md5.pm, Revision 1.1
1.1 ! andrew 1: package Text::Todo::REST::API::Representations::md5;
! 2:
! 3: # $AFresh1: md5.pm,v 1.3 2010/01/18 00:30:55 andrew Exp $
! 4:
! 5: use base 'Text::Todo::REST::API';
! 6:
! 7: use warnings;
! 8: use strict;
! 9: use Carp;
! 10:
! 11: use version; our $VERSION = qv('0.0.1');
! 12:
! 13: {
! 14: my %handled_formats = map { $_ => 1 } qw(
! 15: md5
! 16: );
! 17:
! 18: sub content_type { return 'text/plain' };
! 19:
! 20: sub _handles {
! 21: my ($class, $format) = @_;
! 22: return exists $handled_formats{$format};
! 23: }
! 24:
! 25: sub Dump {
! 26: my ($self, @output) = @_;
! 27: my $action = $self->_action;
! 28:
! 29: my $output;
! 30: if ($action eq 'files') {
! 31: $output .= $self->SUPER::Dump(@output);
! 32: #foreach my $o (@output) {
! 33: #}
! 34: }
! 35: elsif ($action eq 'list' || $action eq 'entry') {
! 36: foreach my $o (@output) {
! 37: $output .= "MD5 ($o->{text}) = $o->{md5}\n";
! 38: }
! 39: }
! 40: else {
! 41: $output .= $self->SUPER::Dump(@output);
! 42: }
! 43: return $output;
! 44: }
! 45: }
! 46:
! 47: 1; # Magic true value required at end of module
! 48: __END__
! 49:
! 50: =head1 NAME
! 51:
! 52: Text::Todo::REST::API::md5 - [One line description of module's purpose here]
! 53:
! 54:
! 55: =head1 VERSION
! 56:
! 57: This document describes Text::Todo::REST::API::md5 version 0.0.1
! 58:
! 59:
! 60: =head1 SYNOPSIS
! 61:
! 62: use Text::Todo::REST::API::md5;
! 63:
! 64: =for author to fill in:
! 65: Brief code example(s) here showing commonest usage(s).
! 66: This section will be as far as many users bother reading
! 67: so make it as educational and exeplary as possible.
! 68:
! 69:
! 70: =head1 DESCRIPTION
! 71:
! 72: =for author to fill in:
! 73: Write a full description of the module and its features here.
! 74: Use subsections (=head2, =head3) as appropriate.
! 75:
! 76:
! 77: =head1 INTERFACE
! 78:
! 79: =for author to fill in:
! 80: Write a separate section listing the public components of the modules
! 81: interface. These normally consist of either subroutines that may be
! 82: exported, or methods that may be called on objects belonging to the
! 83: classes provided by the module.
! 84:
! 85:
! 86: =head1 DIAGNOSTICS
! 87:
! 88: =for author to fill in:
! 89: List every single error and warning message that the module can
! 90: generate (even the ones that will "never happen"), with a full
! 91: explanation of each problem, one or more likely causes, and any
! 92: suggested remedies.
! 93:
! 94: =over
! 95:
! 96: =item C<< Error message here, perhaps with %s placeholders >>
! 97:
! 98: [Description of error here]
! 99:
! 100: =item C<< Another error message here >>
! 101:
! 102: [Description of error here]
! 103:
! 104: [Et cetera, et cetera]
! 105:
! 106: =back
! 107:
! 108:
! 109: =head1 CONFIGURATION AND ENVIRONMENT
! 110:
! 111: =for author to fill in:
! 112: A full explanation of any configuration system(s) used by the
! 113: module, including the names and locations of any configuration
! 114: files, and the meaning of any environment variables or properties
! 115: that can be set. These descriptions must also include details of any
! 116: configuration language used.
! 117:
! 118: Text::Todo::REST::API::md5 requires no configuration files or environment variables.
! 119:
! 120:
! 121: =head1 DEPENDENCIES
! 122:
! 123: =for author to fill in:
! 124: A list of all the other modules that this module relies upon,
! 125: including any restrictions on versions, and an indication whether
! 126: the module is part of the standard Perl distribution, part of the
! 127: module's distribution, or must be installed separately. ]
! 128:
! 129: None.
! 130:
! 131:
! 132: =head1 INCOMPATIBILITIES
! 133:
! 134: =for author to fill in:
! 135: A list of any modules that this module cannot be used in conjunction
! 136: with. This may be due to name conflicts in the interface, or
! 137: competition for system or program resources, or due to internal
! 138: limitations of Perl (for example, many modules that use source code
! 139: filters are mutually incompatible).
! 140:
! 141: None reported.
! 142:
! 143:
! 144: =head1 BUGS AND LIMITATIONS
! 145:
! 146: =for author to fill in:
! 147: A list of known problems with the module, together with some
! 148: indication Whether they are likely to be fixed in an upcoming
! 149: release. Also a list of restrictions on the features the module
! 150: does provide: data types that cannot be handled, performance issues
! 151: and the circumstances in which they may arise, practical
! 152: limitations on the size of data sets, special cases that are not
! 153: (yet) handled, etc.
! 154:
! 155: No bugs have been reported.
! 156:
! 157: Please report any bugs or feature requests to
! 158: C<bug-text-todo-rest-api-md5@rt.cpan.org>, or through the web interface at
! 159: L<http://rt.cpan.org>.
! 160:
! 161:
! 162: =head1 AUTHOR
! 163:
! 164: Andrew Fresh C<< <andrew@cpan.org> >>
! 165:
! 166:
! 167: =head1 LICENSE AND COPYRIGHT
! 168:
! 169: Copyright (c) 2010, Andrew Fresh C<< <andrew@cpan.org> >>. All rights reserved.
! 170:
! 171: This module is free software; you can redistribute it and/or
! 172: modify it under the same terms as Perl itself. See L<perlartistic>.
! 173:
! 174:
! 175: =head1 DISCLAIMER OF WARRANTY
! 176:
! 177: BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
! 178: FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
! 179: OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
! 180: PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
! 181: EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
! 182: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
! 183: ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
! 184: YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
! 185: NECESSARY SERVICING, REPAIR, OR CORRECTION.
! 186:
! 187: IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
! 188: WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
! 189: REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
! 190: LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
! 191: OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
! 192: THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
! 193: RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
! 194: FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
! 195: SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
! 196: SUCH DAMAGES.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>