Changeset 2805 for lang/perl/Catalyst-Controller-Atompub
- Timestamp:
- 12/07/07 23:05:47 (5 years ago)
- Location:
- lang/perl/Catalyst-Controller-Atompub
- Files:
-
- 4 added
- 35 modified
- 5 copied
-
tags/0.2.3 (copied) (copied from lang/perl/Catalyst-Controller-Atompub/trunk)
-
tags/0.2.3/Changes (copied) (copied from lang/perl/Catalyst-Controller-Atompub/trunk/Changes) (1 diff)
-
tags/0.2.3/META.yml (copied) (copied from lang/perl/Catalyst-Controller-Atompub/trunk/META.yml)
-
tags/0.2.3/lib/Catalyst/Controller/Atompub.pm (copied) (copied from lang/perl/Catalyst-Controller-Atompub/trunk/lib/Catalyst/Controller/Atompub.pm) (2 diffs)
-
tags/0.2.3/lib/Catalyst/Controller/Atompub/Collection.pm (copied) (copied from lang/perl/Catalyst-Controller-Atompub/trunk/lib/Catalyst/Controller/Atompub/Collection.pm)
-
tags/0.2.3/samples/MyAtom/atom.db (added)
-
tags/0.2.3/samples/MyAtom/init.sql (modified) (1 diff)
-
tags/0.2.3/samples/MyAtom/lib/MyAtom.pm (modified) (1 diff)
-
tags/0.2.3/samples/MyAtom/lib/MyAtom/Controller/MyCollection.pm (modified) (4 diffs)
-
tags/0.2.3/samples/MyAtom/lib/MyAtom/Controller/MyService.pm (modified) (1 diff)
-
tags/0.2.3/samples/MyAtom/lib/MyAtom/Controller/Root.pm (modified) (2 diffs)
-
tags/0.2.3/samples/MyAtom/lib/MyAtom/Model/DBIC.pm (modified) (1 diff)
-
tags/0.2.3/samples/MyAtom/t/01.t (modified) (1 diff)
-
tags/0.2.3/samples/MyBlog/atom.db (added)
-
tags/0.2.3/samples/MyBlog/init.sql (modified) (3 diffs)
-
tags/0.2.3/samples/MyBlog/lib/MyBlog.pm (modified) (1 diff)
-
tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/EntryCollection.pm (modified) (2 diffs)
-
tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/Html.pm (modified) (2 diffs)
-
tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/MediaCollection.pm (modified) (2 diffs)
-
tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/Root.pm (modified) (3 diffs)
-
tags/0.2.3/samples/MyBlog/lib/MyBlog/View/TT.pm (modified) (1 diff)
-
tags/0.2.3/samples/MyBlog/myblog.yml (modified) (1 diff)
-
tags/0.2.3/samples/MyBlog/t/01.t (modified) (1 diff)
-
trunk/Changes (modified) (1 diff)
-
trunk/META.yml (modified) (2 diffs)
-
trunk/lib/Catalyst/Controller/Atompub.pm (modified) (2 diffs)
-
trunk/samples/MyAtom/atom.db (added)
-
trunk/samples/MyAtom/init.sql (modified) (1 diff)
-
trunk/samples/MyAtom/lib/MyAtom.pm (modified) (1 diff)
-
trunk/samples/MyAtom/lib/MyAtom/Controller/MyCollection.pm (modified) (4 diffs)
-
trunk/samples/MyAtom/lib/MyAtom/Controller/MyService.pm (modified) (1 diff)
-
trunk/samples/MyAtom/lib/MyAtom/Controller/Root.pm (modified) (2 diffs)
-
trunk/samples/MyAtom/lib/MyAtom/Model/DBIC.pm (modified) (1 diff)
-
trunk/samples/MyAtom/t/01.t (modified) (1 diff)
-
trunk/samples/MyBlog/atom.db (added)
-
trunk/samples/MyBlog/init.sql (modified) (3 diffs)
-
trunk/samples/MyBlog/lib/MyBlog.pm (modified) (1 diff)
-
trunk/samples/MyBlog/lib/MyBlog/Controller/EntryCollection.pm (modified) (2 diffs)
-
trunk/samples/MyBlog/lib/MyBlog/Controller/Html.pm (modified) (2 diffs)
-
trunk/samples/MyBlog/lib/MyBlog/Controller/MediaCollection.pm (modified) (2 diffs)
-
trunk/samples/MyBlog/lib/MyBlog/Controller/Root.pm (modified) (3 diffs)
-
trunk/samples/MyBlog/lib/MyBlog/View/TT.pm (modified) (1 diff)
-
trunk/samples/MyBlog/myblog.yml (modified) (1 diff)
-
trunk/samples/MyBlog/t/01.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/Changes
r2132 r2805 1 2007-12-07 Takeru INOUE <takeru.inoue _ gmail.com> 2 3 * release 0.2.3: 4 * samples/ 5 - change database to SQLite3 from MySQL 6 - remove unnecessary POD 7 1 8 2007-11-29 Takeru INOUE <takeru.inoue _ gmail.com> 2 9 -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/lib/Catalyst/Controller/Atompub.pm
r2132 r2805 5 5 use Carp; 6 6 7 use version; our $VERSION = qv('0.2. 2');7 use version; our $VERSION = qv('0.2.3'); 8 8 9 9 use Atompub 0.1.6; … … 94 94 Authentication::Credential::HTTP 95 95 96 =item * MySQL v4.0 or later96 =item * SQLite v3.0 or later 97 97 98 98 Initialize your database with C<init.sql> before running the samples. 99 The initialization script assums that database name is 'test', 100 username is 'test', and password is 'test'. 99 The initialization script assums that database is C<atom.db>. 101 100 102 101 =back -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/init.sql
r1860 r2805 2 2 3 3 CREATE TABLE entries ( 4 id INT AUTO_INCREMENT, 5 edited TIMESTAMP, 6 7 uri VARCHAR(255) NOT NULL, 8 xml TEXT NOT NULL, 9 10 PRIMARY KEY(id), 4 id INTEGER PRIMARY KEY, 5 edited INTEGER, 6 uri TEXT, 7 xml TEXT, 11 8 UNIQUE(uri) 12 9 ); 13 -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/lib/MyAtom.pm
r1860 r2805 33 33 __PACKAGE__->setup; 34 34 35 36 =head1 NAME37 38 MyAtom - Catalyst based application39 40 =head1 SYNOPSIS41 42 script/myatom_server.pl43 44 =head1 DESCRIPTION45 46 [enter your description here]47 48 =head1 SEE ALSO49 50 L<MyAtom::Controller::Root>, L<Catalyst>51 52 =head1 AUTHOR53 54 Takeru INOUE,,,55 56 =head1 LICENSE57 58 This library is free software, you can redistribute it and/or modify59 it under the same terms as Perl itself.60 61 =cut62 63 35 1; -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/lib/MyAtom/Controller/MyCollection.pm
r1860 r2805 5 5 use warnings; 6 6 use base 'Catalyst::Controller::Atompub::Collection'; 7 8 =head1 NAME9 10 MyAtom::Controller::MyCollection - Catalyst Controller11 12 =head1 DESCRIPTION13 14 Catalyst Controller.15 16 =head1 METHODS17 18 =cut19 7 20 8 # List resources in a Feed Document, which must be implemented in … … 49 37 50 38 # app:edited element, which was assigned by C::C::Atompub, 51 # is coverted into ISO 8601 format like '2007-01-01 00:00:00'52 my $edited = $self->edited-> iso;39 # is coverted into UNIX time 40 my $edited = $self->edited->epoch; 53 41 54 42 # POSTed Entry (XML::Atom::Entry) … … 92 80 93 81 # app:edited element, which was assigned by C::C::Atompub, 94 # is coverted into ISO 8601 format like '2007-01-01 00:00:00'95 my $edited = $self->edited-> iso;82 # is coverted into UNIX time 83 my $edited = $self->edited->epoch; 96 84 97 85 # PUTted Entry (XML::Atom::Entry) … … 124 112 } 125 113 126 =head1 AUTHOR127 128 Takeru INOUE,,,129 130 =head1 LICENSE131 132 This library is free software, you can redistribute it and/or modify133 it under the same terms as Perl itself.134 135 =cut136 137 114 1; -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/lib/MyAtom/Controller/MyService.pm
r1860 r2805 6 6 use base 'Catalyst::Controller::Atompub::Service'; 7 7 8 =head1 NAME9 10 MyAtom::Controller::MyService - Catalyst Controller11 12 =head1 DESCRIPTION13 14 Catalyst Controller.15 16 =head1 METHODS17 18 =cut19 20 21 =head1 AUTHOR22 23 Takeru INOUE,,,24 25 =head1 LICENSE26 27 This library is free software, you can redistribute it and/or modify28 it under the same terms as Perl itself.29 30 =cut31 32 8 1; -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/lib/MyAtom/Controller/Root.pm
r1860 r2805 12 12 __PACKAGE__->config->{namespace} = ''; 13 13 14 =head1 NAME15 16 MyAtom::Controller::Root - Root Controller for MyAtom17 18 =head1 DESCRIPTION19 20 [enter your description here]21 22 =head1 METHODS23 24 =cut25 26 =head2 default27 28 =cut29 30 14 sub default : Private { 31 15 my ( $self, $c ) = @_; … … 35 19 } 36 20 37 =head2 end38 39 Attempt to render a view, if needed.40 41 =cut42 43 21 sub end : ActionClass('RenderView') {} 44 22 45 =head1 AUTHOR46 47 Takeru INOUE,,,48 49 =head1 LICENSE50 51 This library is free software, you can redistribute it and/or modify52 it under the same terms as Perl itself.53 54 =cut55 56 23 1; -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/lib/MyAtom/Model/DBIC.pm
r1860 r2805 8 8 schema_class => 'MyAtom::Model::Schema', 9 9 connect_info => [ 10 'dbi:mysql:test', 11 'test', 12 'test', 13 10 'dbi:SQLite:dbname=atom.db', 14 11 ], 15 12 ); 16 13 17 =head1 NAME18 19 MyAtom::Model::DBIC - Catalyst DBIC Schema Model20 =head1 SYNOPSIS21 22 See L<MyAtom>23 24 =head1 DESCRIPTION25 26 L<Catalyst::Model::DBIC::Schema> Model using schema L<MyAtom::Model::Schema>27 28 =head1 AUTHOR29 30 Takeru INOUE,,,31 32 =head1 LICENSE33 34 This library is free software, you can redistribute it and/or modify35 it under the same terms as Perl itself.36 37 =cut38 39 14 1; -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/t/01.t
r1860 r2805 11 11 use XML::Atom::Entry; 12 12 13 my $db = my $user = my $pass = 'test'; 14 system "mysql -u $user -p$pass $db < $FindBin::Bin/../init.sql" || die; 13 system "sqlite3 $FindBin::Bin/../atom.db < $FindBin::Bin/../init.sql" || die; 15 14 16 15 -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/init.sql
r1860 r2805 4 4 5 5 CREATE TABLE entries ( 6 id INT AUTO_INCREMENT,7 edited TIMESTAMP,6 id INTEGER PRIMARY KEY, 7 edited INTEGER, 8 8 9 uri VARCHAR(255) NOT NULL,10 etag VARCHAR(255),11 body TEXT NOT NULL, #XML9 uri TEXT, 10 etag TEXT, 11 body TEXT, -- XML 12 12 13 PRIMARY KEY(id),14 13 UNIQUE(uri) 15 14 ); 16 15 17 16 CREATE TABLE medias ( 18 id INT AUTO_INCREMENT,19 edited TIMESTAMP,17 id INTEGER PRIMARY KEY, 18 edited INTEGER, 20 19 21 entry_uri VARCHAR(255) NOT NULL,22 entry_etag VARCHAR(255),23 entry_body TEXT NOT NULL, #XML20 entry_uri TEXT, 21 entry_etag TEXT, 22 entry_body TEXT, -- XML 24 23 25 media_uri VARCHAR(255) NOT NULL,26 media_etag VARCHAR(255),27 media_body TEXT NOT NULL, #Base6428 media_type VARCHAR(32) NOT NULL,24 media_uri TEXT, 25 media_etag TEXT, 26 media_body TEXT, -- Base64 27 media_type TEXT, 29 28 30 PRIMARY KEY(id),31 29 UNIQUE(entry_uri) 32 30 ); … … 34 32 35 33 CREATE TABLE users ( 36 id INT AUTO_INCREMENT,37 created_on TIMESTAMP,34 id INTEGER PRIMARY KEY, 35 created_on INTEGER, 38 36 39 username VARCHAR(32) NOT NULL,40 password VARCHAR(32) NOT NULL,37 username TEXT, 38 password TEXT, 41 39 42 PRIMARY KEY(id),43 40 UNIQUE(username) 44 41 ); … … 52 49 'acbd18db4cc2f85cedef654fccc4a4d8' 53 50 ); 54 -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog.pm
r1860 r2805 41 41 __PACKAGE__->setup; 42 42 43 44 =head1 NAME45 46 MyBlog - Catalyst based application47 48 =head1 SYNOPSIS49 50 script/myblog_server.pl51 52 =head1 DESCRIPTION53 54 [enter your description here]55 56 =head1 SEE ALSO57 58 L<MyBlog::Controller::Root>, L<Catalyst>59 60 =head1 AUTHOR61 62 Takeru INOUE,,,63 64 =head1 LICENSE65 66 This library is free software, you can redistribute it and/or modify67 it under the same terms as Perl itself.68 69 =cut70 71 43 1; -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/EntryCollection.pm
r1860 r2805 64 64 65 65 my $vals = { 66 edited => $self->edited-> iso,66 edited => $self->edited->epoch, 67 67 uri => $uri, 68 68 etag => $self->calculate_new_etag( $c, $uri ), … … 100 100 101 101 my $vals = { 102 edited => $self->edited-> iso,102 edited => $self->edited->epoch, 103 103 uri => $uri, 104 104 etag => $self->calculate_new_etag( $c, $uri ), -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/Html.pm
r1860 r2805 5 5 use warnings; 6 6 use base 'Catalyst::Controller'; 7 8 =head1 NAME9 10 MyBlog::Controller::Html - Catalyst Controller11 12 =head1 DESCRIPTION13 14 Catalyst Controller.15 16 =head1 METHODS17 18 =cut19 20 21 =head2 index22 23 =cut24 7 25 8 use Atompub::DateTime qw( datetime ); … … 85 68 } 86 69 87 88 =head1 AUTHOR89 90 Takeru INOUE,,,91 92 =head1 LICENSE93 94 This library is free software, you can redistribute it and/or modify95 it under the same terms as Perl itself.96 97 =cut98 99 70 1; -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/MediaCollection.pm
r1860 r2805 64 64 65 65 my $vals = { 66 edited => $self->edited-> iso,66 edited => $self->edited->epoch, 67 67 entry_uri => $entry_uri, 68 68 entry_etag => $self->calculate_new_etag( $c, $entry_uri ), … … 114 114 || return $self->error( $c, RC_NOT_FOUND ); 115 115 116 my $vals = { edited => $self->edited-> iso};116 my $vals = { edited => $self->edited->epoch }; 117 117 118 118 if ( $rs->entry_uri eq $uri ) { -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/Root.pm
r1860 r2805 12 12 __PACKAGE__->config->{namespace} = ''; 13 13 14 =head1 NAME15 16 MyBlog::Controller::Root - Root Controller for MyBlog17 18 =head1 DESCRIPTION19 20 [enter your description here]21 22 =head1 METHODS23 24 =cut25 26 14 sub auto :Private { 27 15 my ( $self, $c ) = @_; … … 36 24 } 37 25 38 =head2 default39 40 =cut41 42 26 sub default : Private { 43 27 my ( $self, $c ) = @_; … … 45 29 } 46 30 47 =head2 end48 49 Attempt to render a view, if needed.50 51 =cut52 53 31 sub end : ActionClass('RenderView') {} 54 32 55 =head1 AUTHOR56 57 Takeru INOUE,,,58 59 =head1 LICENSE60 61 This library is free software, you can redistribute it and/or modify62 it under the same terms as Perl itself.63 64 =cut65 66 33 1; -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog/View/TT.pm
r1860 r2805 18 18 }); 19 19 20 =head1 NAME21 22 MyBlog::View::TT - Catalyst TTSite View23 24 =head1 SYNOPSIS25 26 See L<MyBlog>27 28 =head1 DESCRIPTION29 30 Catalyst TTSite View.31 32 =head1 AUTHOR33 34 Takeru INOUE,,,35 36 =head1 LICENSE37 38 This library is free software, you can redistribute it and/or modify39 it under the same terms as Perl itself.40 41 =cut42 43 20 1; 44 21 -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/myblog.yml
r1860 r2805 35 35 schema_class: MyBlog::Model::Schema 36 36 connect_info: 37 - dbi:mysql:test 38 - test 39 - test 37 - dbi:SQLite:dbname=atom.db 40 38 41 39 authentication: -
lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/t/01.t
r1860 r2805 12 12 use XML::Atom::Entry; 13 13 14 my $db = my $user = my $pass = 'test'; 15 system "mysql -u $user -p$pass $db < $FindBin::Bin/../init.sql" || die; 14 system "sqlite3 $FindBin::Bin/../atom.db < $FindBin::Bin/../init.sql" || die; 16 15 17 16 -
lang/perl/Catalyst-Controller-Atompub/trunk/Changes
r2132 r2805 1 2007-12-07 Takeru INOUE <takeru.inoue _ gmail.com> 2 3 * release 0.2.3: 4 * samples/ 5 - change database to SQLite3 from MySQL 6 - remove unnecessary POD 7 1 8 2007-11-29 Takeru INOUE <takeru.inoue _ gmail.com> 2 9 -
lang/perl/Catalyst-Controller-Atompub/trunk/META.yml
r2132 r2805 1 1 --- 2 2 name: Catalyst-Controller-Atompub 3 version: 0.2. 23 version: 0.2.3 4 4 author: 5 5 - 'Takeru INOUE <takeru.inoue _ gmail.com>' … … 26 26 Catalyst::Controller::Atompub: 27 27 file: lib/Catalyst/Controller/Atompub.pm 28 version: 0.2. 228 version: 0.2.3 29 29 Catalyst::Controller::Atompub::Base: 30 30 file: lib/Catalyst/Controller/Atompub/Base.pm -
lang/perl/Catalyst-Controller-Atompub/trunk/lib/Catalyst/Controller/Atompub.pm
r2132 r2805 5 5 use Carp; 6 6 7 use version; our $VERSION = qv('0.2. 2');7 use version; our $VERSION = qv('0.2.3'); 8 8 9 9 use Atompub 0.1.6; … … 94 94 Authentication::Credential::HTTP 95 95 96 =item * MySQL v4.0 or later96 =item * SQLite v3.0 or later 97 97 98 98 Initialize your database with C<init.sql> before running the samples. 99 The initialization script assums that database name is 'test', 100 username is 'test', and password is 'test'. 99 The initialization script assums that database is C<atom.db>. 101 100 102 101 =back -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/init.sql
r1860 r2805 2 2 3 3 CREATE TABLE entries ( 4 id INT AUTO_INCREMENT, 5 edited TIMESTAMP, 6 7 uri VARCHAR(255) NOT NULL, 8 xml TEXT NOT NULL, 9 10 PRIMARY KEY(id), 4 id INTEGER PRIMARY KEY, 5 edited INTEGER, 6 uri TEXT, 7 xml TEXT, 11 8 UNIQUE(uri) 12 9 ); 13 -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/lib/MyAtom.pm
r1860 r2805 33 33 __PACKAGE__->setup; 34 34 35 36 =head1 NAME37 38 MyAtom - Catalyst based application39 40 =head1 SYNOPSIS41 42 script/myatom_server.pl43 44 =head1 DESCRIPTION45 46 [enter your description here]47 48 =head1 SEE ALSO49 50 L<MyAtom::Controller::Root>, L<Catalyst>51 52 =head1 AUTHOR53 54 Takeru INOUE,,,55 56 =head1 LICENSE57 58 This library is free software, you can redistribute it and/or modify59 it under the same terms as Perl itself.60 61 =cut62 63 35 1; -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/lib/MyAtom/Controller/MyCollection.pm
r1860 r2805 5 5 use warnings; 6 6 use base 'Catalyst::Controller::Atompub::Collection'; 7 8 =head1 NAME9 10 MyAtom::Controller::MyCollection - Catalyst Controller11 12 =head1 DESCRIPTION13 14 Catalyst Controller.15 16 =head1 METHODS17 18 =cut19 7 20 8 # List resources in a Feed Document, which must be implemented in … … 49 37 50 38 # app:edited element, which was assigned by C::C::Atompub, 51 # is coverted into ISO 8601 format like '2007-01-01 00:00:00'52 my $edited = $self->edited-> iso;39 # is coverted into UNIX time 40 my $edited = $self->edited->epoch; 53 41 54 42 # POSTed Entry (XML::Atom::Entry) … … 92 80 93 81 # app:edited element, which was assigned by C::C::Atompub, 94 # is coverted into ISO 8601 format like '2007-01-01 00:00:00'95 my $edited = $self->edited-> iso;82 # is coverted into UNIX time 83 my $edited = $self->edited->epoch; 96 84 97 85 # PUTted Entry (XML::Atom::Entry) … … 124 112 } 125 113 126 =head1 AUTHOR127 128 Takeru INOUE,,,129 130 =head1 LICENSE131 132 This library is free software, you can redistribute it and/or modify133 it under the same terms as Perl itself.134 135 =cut136 137 114 1; -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/lib/MyAtom/Controller/MyService.pm
r1860 r2805 6 6 use base 'Catalyst::Controller::Atompub::Service'; 7 7 8 =head1 NAME9 10 MyAtom::Controller::MyService - Catalyst Controller11 12 =head1 DESCRIPTION13 14 Catalyst Controller.15 16 =head1 METHODS17 18 =cut19 20 21 =head1 AUTHOR22 23 Takeru INOUE,,,24 25 =head1 LICENSE26 27 This library is free software, you can redistribute it and/or modify28 it under the same terms as Perl itself.29 30 =cut31 32 8 1; -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/lib/MyAtom/Controller/Root.pm
r1860 r2805 12 12 __PACKAGE__->config->{namespace} = ''; 13 13 14 =head1 NAME15 16 MyAtom::Controller::Root - Root Controller for MyAtom17 18 =head1 DESCRIPTION19 20 [enter your description here]21 22 =head1 METHODS23 24 =cut25 26 =head2 default27 28 =cut29 30 14 sub default : Private { 31 15 my ( $self, $c ) = @_; … … 35 19 } 36 20 37 =head2 end38 39 Attempt to render a view, if needed.40 41 =cut42 43 21 sub end : ActionClass('RenderView') {} 44 22 45 =head1 AUTHOR46 47 Takeru INOUE,,,48 49 =head1 LICENSE50 51 This library is free software, you can redistribute it and/or modify52 it under the same terms as Perl itself.53 54 =cut55 56 23 1; -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/lib/MyAtom/Model/DBIC.pm
r1860 r2805 8 8 schema_class => 'MyAtom::Model::Schema', 9 9 connect_info => [ 10 'dbi:mysql:test', 11 'test', 12 'test', 13 10 'dbi:SQLite:dbname=atom.db', 14 11 ], 15 12 ); 16 13 17 =head1 NAME18 19 MyAtom::Model::DBIC - Catalyst DBIC Schema Model20 =head1 SYNOPSIS21 22 See L<MyAtom>23 24 =head1 DESCRIPTION25 26 L<Catalyst::Model::DBIC::Schema> Model using schema L<MyAtom::Model::Schema>27 28 =head1 AUTHOR29 30 Takeru INOUE,,,31 32 =head1 LICENSE33 34 This library is free software, you can redistribute it and/or modify35 it under the same terms as Perl itself.36 37 =cut38 39 14 1; -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/t/01.t
r1860 r2805 11 11 use XML::Atom::Entry; 12 12 13 my $db = my $user = my $pass = 'test'; 14 system "mysql -u $user -p$pass $db < $FindBin::Bin/../init.sql" || die; 13 system "sqlite3 $FindBin::Bin/../atom.db < $FindBin::Bin/../init.sql" || die; 15 14 16 15 -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/init.sql
r1860 r2805 4 4 5 5 CREATE TABLE entries ( 6 id INT AUTO_INCREMENT,7 edited TIMESTAMP,6 id INTEGER PRIMARY KEY, 7 edited INTEGER, 8 8 9 uri VARCHAR(255) NOT NULL,10 etag VARCHAR(255),11 body TEXT NOT NULL, #XML9 uri TEXT, 10 etag TEXT, 11 body TEXT, -- XML 12 12 13 PRIMARY KEY(id),14 13 UNIQUE(uri) 15 14 ); 16 15 17 16 CREATE TABLE medias ( 18 id INT AUTO_INCREMENT,19 edited TIMESTAMP,17 id INTEGER PRIMARY KEY, 18 edited INTEGER, 20 19 21 entry_uri VARCHAR(255) NOT NULL,22 entry_etag VARCHAR(255),23 entry_body TEXT NOT NULL, #XML20 entry_uri TEXT, 21 entry_etag TEXT, 22 entry_body TEXT, -- XML 24 23 25 media_uri VARCHAR(255) NOT NULL,26 media_etag VARCHAR(255),27 media_body TEXT NOT NULL, #Base6428 media_type VARCHAR(32) NOT NULL,24 media_uri TEXT, 25 media_etag TEXT, 26 media_body TEXT, -- Base64 27 media_type TEXT, 29 28 30 PRIMARY KEY(id),31 29 UNIQUE(entry_uri) 32 30 ); … … 34 32 35 33 CREATE TABLE users ( 36 id INT AUTO_INCREMENT,37 created_on TIMESTAMP,34 id INTEGER PRIMARY KEY, 35 created_on INTEGER, 38 36 39 username VARCHAR(32) NOT NULL,40 password VARCHAR(32) NOT NULL,37 username TEXT, 38 password TEXT, 41 39 42 PRIMARY KEY(id),43 40 UNIQUE(username) 44 41 ); … … 52 49 'acbd18db4cc2f85cedef654fccc4a4d8' 53 50 ); 54 -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog.pm
r1860 r2805 41 41 __PACKAGE__->setup; 42 42 43 44 =head1 NAME45 46 MyBlog - Catalyst based application47 48 =head1 SYNOPSIS49 50 script/myblog_server.pl51 52 =head1 DESCRIPTION53 54 [enter your description here]55 56 =head1 SEE ALSO57 58 L<MyBlog::Controller::Root>, L<Catalyst>59 60 =head1 AUTHOR61 62 Takeru INOUE,,,63 64 =head1 LICENSE65 66 This library is free software, you can redistribute it and/or modify67 it under the same terms as Perl itself.68 69 =cut70 71 43 1; -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog/Controller/EntryCollection.pm
r1860 r2805 64 64 65 65 my $vals = { 66 edited => $self->edited-> iso,66 edited => $self->edited->epoch, 67 67 uri => $uri, 68 68 etag => $self->calculate_new_etag( $c, $uri ), … … 100 100 101 101 my $vals = { 102 edited => $self->edited-> iso,102 edited => $self->edited->epoch, 103 103 uri => $uri, 104 104 etag => $self->calculate_new_etag( $c, $uri ), -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog/Controller/Html.pm
r1860 r2805 5 5 use warnings; 6 6 use base 'Catalyst::Controller'; 7 8 =head1 NAME9 10 MyBlog::Controller::Html - Catalyst Controller11 12 =head1 DESCRIPTION13 14 Catalyst Controller.15 16 =head1 METHODS17 18 =cut19 20 21 =head2 index22 23 =cut24 7 25 8 use Atompub::DateTime qw( datetime ); … … 85 68 } 86 69 87 88 =head1 AUTHOR89 90 Takeru INOUE,,,91 92 =head1 LICENSE93 94 This library is free software, you can redistribute it and/or modify95 it under the same terms as Perl itself.96 97 =cut98 99 70 1; -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog/Controller/MediaCollection.pm
r1860 r2805 64 64 65 65 my $vals = { 66 edited => $self->edited-> iso,66 edited => $self->edited->epoch, 67 67 entry_uri => $entry_uri, 68 68 entry_etag => $self->calculate_new_etag( $c, $entry_uri ), … … 114 114 || return $self->error( $c, RC_NOT_FOUND ); 115 115 116 my $vals = { edited => $self->edited-> iso};116 my $vals = { edited => $self->edited->epoch }; 117 117 118 118 if ( $rs->entry_uri eq $uri ) { -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog/Controller/Root.pm
r1860 r2805 12 12 __PACKAGE__->config->{namespace} = ''; 13 13 14 =head1 NAME15 16 MyBlog::Controller::Root - Root Controller for MyBlog17 18 =head1 DESCRIPTION19 20 [enter your description here]21 22 =head1 METHODS23 24 =cut25 26 14 sub auto :Private { 27 15 my ( $self, $c ) = @_; … … 36 24 } 37 25 38 =head2 default39 40 =cut41 42 26 sub default : Private { 43 27 my ( $self, $c ) = @_; … … 45 29 } 46 30 47 =head2 end48 49 Attempt to render a view, if needed.50 51 =cut52 53 31 sub end : ActionClass('RenderView') {} 54 32 55 =head1 AUTHOR56 57 Takeru INOUE,,,58 59 =head1 LICENSE60 61 This library is free software, you can redistribute it and/or modify62 it under the same terms as Perl itself.63 64 =cut65 66 33 1; -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog/View/TT.pm
r1860 r2805 18 18 }); 19 19 20 =head1 NAME21 22 MyBlog::View::TT - Catalyst TTSite View23 24 =head1 SYNOPSIS25 26 See L<MyBlog>27 28 =head1 DESCRIPTION29 30 Catalyst TTSite View.31 32 =head1 AUTHOR33 34 Takeru INOUE,,,35 36 =head1 LICENSE37 38 This library is free software, you can redistribute it and/or modify39 it under the same terms as Perl itself.40 41 =cut42 43 20 1; 44 21 -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/myblog.yml
r1860 r2805 35 35 schema_class: MyBlog::Model::Schema 36 36 connect_info: 37 - dbi:mysql:test 38 - test 39 - test 37 - dbi:SQLite:dbname=atom.db 40 38 41 39 authentication: -
lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/t/01.t
r1860 r2805 12 12 use XML::Atom::Entry; 13 13 14 my $db = my $user = my $pass = 'test'; 15 system "mysql -u $user -p$pass $db < $FindBin::Bin/../init.sql" || die; 14 system "sqlite3 $FindBin::Bin/../atom.db < $FindBin::Bin/../init.sql" || die; 16 15 17 16
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)