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