[BACK]Return to md5.pm CVS log [TXT][DIR] Up to [local] / todotxt / Text-Todo-REST-API / lib / Text / Todo / REST / API / Representations

Annotation of todotxt/Text-Todo-REST-API/lib/Text/Todo/REST/API/Representations/md5.pm, Revision 1.3

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>