Annotation of todotxt/Text-Todo/bin/dudelicious.pl, Revision 1.4
1.1 andrew 1: #!/usr/bin/env perl
2:
1.2 andrew 3: package Dudelicious;
4:
1.4 ! andrew 5: use version; our $VERSION = qv('0.1.0');
! 6:
1.2 andrew 7: BEGIN { use FindBin; use lib "$FindBin::Bin/mojo/lib" }
8:
1.1 andrew 9: use Mojolicious::Lite;
10:
11: get '/' => 'index';
12:
13: get '/:groovy' => sub {
14: my $self = shift;
15: $self->render_text($self->param('groovy'), layout => 'funky');
16: };
17:
1.3 andrew 18: app->start unless caller();
1.1 andrew 19: __DATA__
20:
21: @@ index.html.ep
22: % layout 'funky';
23: Yea baby!
24:
25: @@ layouts/funky.html.ep
26: <!doctype html><html>
27: <head><title>Funky!</title></head>
28: <body><%== content %></body>
29: </html>
1.4 ! andrew 30:
! 31: __END__
! 32:
! 33: =head1 NAME
! 34:
! 35: dudelicious - A Mojolicous interface to your todotxt files
! 36:
! 37: =head1 VERSION
! 38:
! 39: Since the $VERSION can't be automatically included,
! 40: here is the RCS Id instead, you'll have to look up $VERSION.
! 41:
! 42: $Id$
! 43:
! 44: =head1 SYNOPSIS
! 45:
! 46: dudelicious daemon
! 47:
! 48: Then browse to http://localhost:3000/
! 49:
! 50: =head1 DESCRIPTION
! 51:
! 52: A Mojolicous web app for access to your todotxt files
! 53:
! 54: The modules are there to give more access to my todo.txt file from more
! 55: places. My goal is a web API for a web interface and then a WebOS version for
! 56: my Palm Pre.
! 57:
! 58: For more information see L<http://todotxt.com>
! 59:
! 60: =head1 USAGE
! 61:
! 62: See todo.pl -h
! 63:
! 64: =head1 OPTIONS
! 65:
! 66: See todo.pl -h
! 67:
! 68: =head1 REQUIRED ARGUMENTS
! 69:
! 70: See todo.pl -h
! 71:
! 72: =head1 CONFIGURATION AND ENVIRONMENT
! 73:
! 74: =head1 DIAGNOSTICS
! 75:
! 76: =head1 DEPENDENCIES
! 77:
! 78: Perl Modules:
! 79:
! 80: =over
! 81:
! 82: =item Text::Todo
! 83:
! 84: =item Mojolicous::Lite
! 85:
! 86: =item version
! 87:
! 88: =back
! 89:
! 90:
! 91: =head1 BUGS AND LIMITATIONS
! 92:
! 93: No bugs have been reported.
! 94:
! 95: =head1 AUTHOR
! 96:
! 97: Andrew Fresh C<< <andrew@cpan.org> >>
! 98:
! 99:
! 100: =head1 LICENSE AND COPYRIGHT
! 101:
! 102: Copyright (c) 2010, Andrew Fresh C<< <andrew@cpan.org> >>. All rights reserved.
! 103:
! 104: This module is free software; you can redistribute it and/or
! 105: modify it under the same terms as Perl itself. See L<perlartistic>.
! 106:
! 107:
! 108: =head1 DISCLAIMER OF WARRANTY
! 109:
! 110: BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
! 111: FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
! 112: OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
! 113: PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
! 114: EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
! 115: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
! 116: ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
! 117: YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
! 118: NECESSARY SERVICING, REPAIR, OR CORRECTION.
! 119:
! 120: IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
! 121: WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
! 122: REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
! 123: LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
! 124: OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
! 125: THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
! 126: RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
! 127: FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
! 128: SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
! 129: SUCH DAMAGES.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>