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