Show
Ignore:
Timestamp:
12/07/07 23:05:47 (5 years ago)
Author:
takemaru
Message:

lang/perl/Catalyst-Controller-Atompub: v0.2.3 released. see Changes in detail

Location:
lang/perl/Catalyst-Controller-Atompub
Files:
4 added
35 modified
5 copied

Legend:

Unmodified
Added
Removed
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/Changes

    r2132 r2805  
     12007-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 
    182007-11-29  Takeru INOUE  <takeru.inoue _ gmail.com> 
    29 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/lib/Catalyst/Controller/Atompub.pm

    r2132 r2805  
    55use Carp; 
    66 
    7 use version; our $VERSION = qv('0.2.2'); 
     7use version; our $VERSION = qv('0.2.3'); 
    88 
    99use Atompub 0.1.6; 
     
    9494    Authentication::Credential::HTTP 
    9595 
    96 =item * MySQL v4.0 or later 
     96=item * SQLite v3.0 or later 
    9797 
    9898Initialize 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'. 
     99The initialization script assums that database is C<atom.db>. 
    101100 
    102101=back 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/init.sql

    r1860 r2805  
    22 
    33CREATE 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, 
    118  UNIQUE(uri) 
    129); 
    13  
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/lib/MyAtom.pm

    r1860 r2805  
    3333__PACKAGE__->setup; 
    3434 
    35  
    36 =head1 NAME 
    37  
    38 MyAtom - Catalyst based application 
    39  
    40 =head1 SYNOPSIS 
    41  
    42     script/myatom_server.pl 
    43  
    44 =head1 DESCRIPTION 
    45  
    46 [enter your description here] 
    47  
    48 =head1 SEE ALSO 
    49  
    50 L<MyAtom::Controller::Root>, L<Catalyst> 
    51  
    52 =head1 AUTHOR 
    53  
    54 Takeru INOUE,,, 
    55  
    56 =head1 LICENSE 
    57  
    58 This library is free software, you can redistribute it and/or modify 
    59 it under the same terms as Perl itself. 
    60  
    61 =cut 
    62  
    63351; 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/lib/MyAtom/Controller/MyCollection.pm

    r1860 r2805  
    55use warnings; 
    66use base 'Catalyst::Controller::Atompub::Collection'; 
    7  
    8 =head1 NAME 
    9  
    10 MyAtom::Controller::MyCollection - Catalyst Controller 
    11  
    12 =head1 DESCRIPTION 
    13  
    14 Catalyst Controller. 
    15  
    16 =head1 METHODS 
    17  
    18 =cut 
    197 
    208# List resources in a Feed Document, which must be implemented in 
     
    4937 
    5038    # 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; 
    5341 
    5442    # POSTed Entry (XML::Atom::Entry) 
     
    9280 
    9381    # 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; 
    9684 
    9785    # PUTted Entry (XML::Atom::Entry) 
     
    124112} 
    125113 
    126 =head1 AUTHOR 
    127  
    128 Takeru INOUE,,, 
    129  
    130 =head1 LICENSE 
    131  
    132 This library is free software, you can redistribute it and/or modify 
    133 it under the same terms as Perl itself. 
    134  
    135 =cut 
    136  
    1371141; 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/lib/MyAtom/Controller/MyService.pm

    r1860 r2805  
    66use base 'Catalyst::Controller::Atompub::Service'; 
    77 
    8 =head1 NAME 
    9  
    10 MyAtom::Controller::MyService - Catalyst Controller 
    11  
    12 =head1 DESCRIPTION 
    13  
    14 Catalyst Controller. 
    15  
    16 =head1 METHODS 
    17  
    18 =cut 
    19  
    20  
    21 =head1 AUTHOR 
    22  
    23 Takeru INOUE,,, 
    24  
    25 =head1 LICENSE 
    26  
    27 This library is free software, you can redistribute it and/or modify 
    28 it under the same terms as Perl itself. 
    29  
    30 =cut 
    31  
    3281; 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/lib/MyAtom/Controller/Root.pm

    r1860 r2805  
    1212__PACKAGE__->config->{namespace} = ''; 
    1313 
    14 =head1 NAME 
    15  
    16 MyAtom::Controller::Root - Root Controller for MyAtom 
    17  
    18 =head1 DESCRIPTION 
    19  
    20 [enter your description here] 
    21  
    22 =head1 METHODS 
    23  
    24 =cut 
    25  
    26 =head2 default 
    27  
    28 =cut 
    29  
    3014sub default : Private { 
    3115    my ( $self, $c ) = @_; 
     
    3519} 
    3620 
    37 =head2 end 
    38  
    39 Attempt to render a view, if needed. 
    40  
    41 =cut  
    42  
    4321sub end : ActionClass('RenderView') {} 
    4422 
    45 =head1 AUTHOR 
    46  
    47 Takeru INOUE,,, 
    48  
    49 =head1 LICENSE 
    50  
    51 This library is free software, you can redistribute it and/or modify 
    52 it under the same terms as Perl itself. 
    53  
    54 =cut 
    55  
    56231; 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/lib/MyAtom/Model/DBIC.pm

    r1860 r2805  
    88    schema_class => 'MyAtom::Model::Schema', 
    99    connect_info => [ 
    10         'dbi:mysql:test', 
    11         'test', 
    12         'test', 
    13          
     10        'dbi:SQLite:dbname=atom.db', 
    1411    ], 
    1512); 
    1613 
    17 =head1 NAME 
    18  
    19 MyAtom::Model::DBIC - Catalyst DBIC Schema Model 
    20 =head1 SYNOPSIS 
    21  
    22 See L<MyAtom> 
    23  
    24 =head1 DESCRIPTION 
    25  
    26 L<Catalyst::Model::DBIC::Schema> Model using schema L<MyAtom::Model::Schema> 
    27  
    28 =head1 AUTHOR 
    29  
    30 Takeru INOUE,,, 
    31  
    32 =head1 LICENSE 
    33  
    34 This library is free software, you can redistribute it and/or modify 
    35 it under the same terms as Perl itself. 
    36  
    37 =cut 
    38  
    39141; 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyAtom/t/01.t

    r1860 r2805  
    1111use XML::Atom::Entry; 
    1212 
    13 my $db = my $user = my $pass = 'test'; 
    14 system "mysql -u $user -p$pass $db < $FindBin::Bin/../init.sql" || die; 
     13system "sqlite3 $FindBin::Bin/../atom.db < $FindBin::Bin/../init.sql" || die; 
    1514 
    1615 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/init.sql

    r1860 r2805  
    44 
    55CREATE TABLE entries ( 
    6   id            INT             AUTO_INCREMENT, 
    7   edited        TIMESTAMP, 
     6  id            INTEGER PRIMARY KEY, 
     7  edited        INTEGER, 
    88 
    9   uri           VARCHAR(255)    NOT NULL, 
    10   etag          VARCHAR(255), 
    11   body          TEXT            NOT NULL,       # XML 
     9  uri           TEXT, 
     10  etag          TEXT, 
     11  body          TEXT,   -- XML 
    1212 
    13   PRIMARY KEY(id), 
    1413  UNIQUE(uri) 
    1514); 
    1615 
    1716CREATE TABLE medias ( 
    18   id            INT             AUTO_INCREMENT, 
    19   edited        TIMESTAMP, 
     17  id            INTEGER PRIMARY KEY, 
     18  edited        INTEGER, 
    2019 
    21   entry_uri     VARCHAR(255)    NOT NULL, 
    22   entry_etag    VARCHAR(255), 
    23   entry_body    TEXT            NOT NULL,       # XML 
     20  entry_uri     TEXT, 
     21  entry_etag    TEXT, 
     22  entry_body    TEXT,   -- XML 
    2423 
    25   media_uri     VARCHAR(255)    NOT NULL, 
    26   media_etag    VARCHAR(255), 
    27   media_body    TEXT            NOT NULL,       # Base64 
    28   media_type    VARCHAR(32)     NOT NULL, 
     24  media_uri     TEXT, 
     25  media_etag    TEXT, 
     26  media_body    TEXT,   -- Base64 
     27  media_type    TEXT, 
    2928 
    30   PRIMARY KEY(id), 
    3129  UNIQUE(entry_uri) 
    3230); 
     
    3432 
    3533CREATE TABLE users ( 
    36   id            INT             AUTO_INCREMENT, 
    37   created_on    TIMESTAMP, 
     34  id            INTEGER PRIMARY KEY, 
     35  created_on    INTEGER, 
    3836 
    39   username      VARCHAR(32)     NOT NULL, 
    40   password      VARCHAR(32)     NOT NULL, 
     37  username      TEXT, 
     38  password      TEXT, 
    4139 
    42   PRIMARY KEY(id), 
    4340  UNIQUE(username) 
    4441); 
     
    5249  'acbd18db4cc2f85cedef654fccc4a4d8' 
    5350); 
    54  
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog.pm

    r1860 r2805  
    4141__PACKAGE__->setup; 
    4242 
    43  
    44 =head1 NAME 
    45  
    46 MyBlog - Catalyst based application 
    47  
    48 =head1 SYNOPSIS 
    49  
    50     script/myblog_server.pl 
    51  
    52 =head1 DESCRIPTION 
    53  
    54 [enter your description here] 
    55  
    56 =head1 SEE ALSO 
    57  
    58 L<MyBlog::Controller::Root>, L<Catalyst> 
    59  
    60 =head1 AUTHOR 
    61  
    62 Takeru INOUE,,, 
    63  
    64 =head1 LICENSE 
    65  
    66 This library is free software, you can redistribute it and/or modify 
    67 it under the same terms as Perl itself. 
    68  
    69 =cut 
    70  
    71431; 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/EntryCollection.pm

    r1860 r2805  
    6464 
    6565    my $vals = { 
    66         edited => $self->edited->iso, 
     66        edited => $self->edited->epoch, 
    6767        uri    => $uri, 
    6868        etag   => $self->calculate_new_etag( $c, $uri ), 
     
    100100 
    101101    my $vals = { 
    102         edited => $self->edited->iso, 
     102        edited => $self->edited->epoch, 
    103103        uri    => $uri, 
    104104        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  
    55use warnings; 
    66use base 'Catalyst::Controller'; 
    7  
    8 =head1 NAME 
    9  
    10 MyBlog::Controller::Html - Catalyst Controller 
    11  
    12 =head1 DESCRIPTION 
    13  
    14 Catalyst Controller. 
    15  
    16 =head1 METHODS 
    17  
    18 =cut 
    19  
    20  
    21 =head2 index  
    22  
    23 =cut 
    247 
    258use Atompub::DateTime qw( datetime ); 
     
    8568} 
    8669 
    87  
    88 =head1 AUTHOR 
    89  
    90 Takeru INOUE,,, 
    91  
    92 =head1 LICENSE 
    93  
    94 This library is free software, you can redistribute it and/or modify 
    95 it under the same terms as Perl itself. 
    96  
    97 =cut 
    98  
    99701; 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/MediaCollection.pm

    r1860 r2805  
    6464 
    6565    my $vals = { 
    66         edited     => $self->edited->iso, 
     66        edited     => $self->edited->epoch, 
    6767        entry_uri  => $entry_uri, 
    6868        entry_etag => $self->calculate_new_etag( $c, $entry_uri ), 
     
    114114        || return $self->error( $c, RC_NOT_FOUND ); 
    115115 
    116     my $vals = { edited => $self->edited->iso }; 
     116    my $vals = { edited => $self->edited->epoch }; 
    117117 
    118118    if ( $rs->entry_uri eq $uri ) { 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog/Controller/Root.pm

    r1860 r2805  
    1212__PACKAGE__->config->{namespace} = ''; 
    1313 
    14 =head1 NAME 
    15  
    16 MyBlog::Controller::Root - Root Controller for MyBlog 
    17  
    18 =head1 DESCRIPTION 
    19  
    20 [enter your description here] 
    21  
    22 =head1 METHODS 
    23  
    24 =cut 
    25  
    2614sub auto :Private { 
    2715    my ( $self, $c ) = @_; 
     
    3624} 
    3725 
    38 =head2 default 
    39  
    40 =cut 
    41  
    4226sub default : Private { 
    4327    my ( $self, $c ) = @_; 
     
    4529} 
    4630 
    47 =head2 end 
    48  
    49 Attempt to render a view, if needed. 
    50  
    51 =cut  
    52  
    5331sub end : ActionClass('RenderView') {} 
    5432 
    55 =head1 AUTHOR 
    56  
    57 Takeru INOUE,,, 
    58  
    59 =head1 LICENSE 
    60  
    61 This library is free software, you can redistribute it and/or modify 
    62 it under the same terms as Perl itself. 
    63  
    64 =cut 
    65  
    66331; 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/lib/MyBlog/View/TT.pm

    r1860 r2805  
    1818}); 
    1919 
    20 =head1 NAME 
    21  
    22 MyBlog::View::TT - Catalyst TTSite View 
    23  
    24 =head1 SYNOPSIS 
    25  
    26 See L<MyBlog> 
    27  
    28 =head1 DESCRIPTION 
    29  
    30 Catalyst TTSite View. 
    31  
    32 =head1 AUTHOR 
    33  
    34 Takeru INOUE,,, 
    35  
    36 =head1 LICENSE 
    37  
    38 This library is free software, you can redistribute it and/or modify 
    39 it under the same terms as Perl itself. 
    40  
    41 =cut 
    42  
    43201; 
    4421 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/myblog.yml

    r1860 r2805  
    3535    schema_class: MyBlog::Model::Schema 
    3636    connect_info: 
    37         - dbi:mysql:test 
    38         - test 
    39         - test 
     37        - dbi:SQLite:dbname=atom.db 
    4038 
    4139authentication: 
  • lang/perl/Catalyst-Controller-Atompub/tags/0.2.3/samples/MyBlog/t/01.t

    r1860 r2805  
    1212use XML::Atom::Entry; 
    1313 
    14 my $db = my $user = my $pass = 'test'; 
    15 system "mysql -u $user -p$pass $db < $FindBin::Bin/../init.sql" || die; 
     14system "sqlite3 $FindBin::Bin/../atom.db < $FindBin::Bin/../init.sql" || die; 
    1615 
    1716 
  • lang/perl/Catalyst-Controller-Atompub/trunk/Changes

    r2132 r2805  
     12007-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 
    182007-11-29  Takeru INOUE  <takeru.inoue _ gmail.com> 
    29 
  • lang/perl/Catalyst-Controller-Atompub/trunk/META.yml

    r2132 r2805  
    11--- 
    22name: Catalyst-Controller-Atompub 
    3 version: 0.2.2 
     3version: 0.2.3 
    44author: 
    55  - 'Takeru INOUE <takeru.inoue _ gmail.com>' 
     
    2626  Catalyst::Controller::Atompub: 
    2727    file: lib/Catalyst/Controller/Atompub.pm 
    28     version: 0.2.2 
     28    version: 0.2.3 
    2929  Catalyst::Controller::Atompub::Base: 
    3030    file: lib/Catalyst/Controller/Atompub/Base.pm 
  • lang/perl/Catalyst-Controller-Atompub/trunk/lib/Catalyst/Controller/Atompub.pm

    r2132 r2805  
    55use Carp; 
    66 
    7 use version; our $VERSION = qv('0.2.2'); 
     7use version; our $VERSION = qv('0.2.3'); 
    88 
    99use Atompub 0.1.6; 
     
    9494    Authentication::Credential::HTTP 
    9595 
    96 =item * MySQL v4.0 or later 
     96=item * SQLite v3.0 or later 
    9797 
    9898Initialize 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'. 
     99The initialization script assums that database is C<atom.db>. 
    101100 
    102101=back 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/init.sql

    r1860 r2805  
    22 
    33CREATE 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, 
    118  UNIQUE(uri) 
    129); 
    13  
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/lib/MyAtom.pm

    r1860 r2805  
    3333__PACKAGE__->setup; 
    3434 
    35  
    36 =head1 NAME 
    37  
    38 MyAtom - Catalyst based application 
    39  
    40 =head1 SYNOPSIS 
    41  
    42     script/myatom_server.pl 
    43  
    44 =head1 DESCRIPTION 
    45  
    46 [enter your description here] 
    47  
    48 =head1 SEE ALSO 
    49  
    50 L<MyAtom::Controller::Root>, L<Catalyst> 
    51  
    52 =head1 AUTHOR 
    53  
    54 Takeru INOUE,,, 
    55  
    56 =head1 LICENSE 
    57  
    58 This library is free software, you can redistribute it and/or modify 
    59 it under the same terms as Perl itself. 
    60  
    61 =cut 
    62  
    63351; 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/lib/MyAtom/Controller/MyCollection.pm

    r1860 r2805  
    55use warnings; 
    66use base 'Catalyst::Controller::Atompub::Collection'; 
    7  
    8 =head1 NAME 
    9  
    10 MyAtom::Controller::MyCollection - Catalyst Controller 
    11  
    12 =head1 DESCRIPTION 
    13  
    14 Catalyst Controller. 
    15  
    16 =head1 METHODS 
    17  
    18 =cut 
    197 
    208# List resources in a Feed Document, which must be implemented in 
     
    4937 
    5038    # 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; 
    5341 
    5442    # POSTed Entry (XML::Atom::Entry) 
     
    9280 
    9381    # 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; 
    9684 
    9785    # PUTted Entry (XML::Atom::Entry) 
     
    124112} 
    125113 
    126 =head1 AUTHOR 
    127  
    128 Takeru INOUE,,, 
    129  
    130 =head1 LICENSE 
    131  
    132 This library is free software, you can redistribute it and/or modify 
    133 it under the same terms as Perl itself. 
    134  
    135 =cut 
    136  
    1371141; 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/lib/MyAtom/Controller/MyService.pm

    r1860 r2805  
    66use base 'Catalyst::Controller::Atompub::Service'; 
    77 
    8 =head1 NAME 
    9  
    10 MyAtom::Controller::MyService - Catalyst Controller 
    11  
    12 =head1 DESCRIPTION 
    13  
    14 Catalyst Controller. 
    15  
    16 =head1 METHODS 
    17  
    18 =cut 
    19  
    20  
    21 =head1 AUTHOR 
    22  
    23 Takeru INOUE,,, 
    24  
    25 =head1 LICENSE 
    26  
    27 This library is free software, you can redistribute it and/or modify 
    28 it under the same terms as Perl itself. 
    29  
    30 =cut 
    31  
    3281; 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/lib/MyAtom/Controller/Root.pm

    r1860 r2805  
    1212__PACKAGE__->config->{namespace} = ''; 
    1313 
    14 =head1 NAME 
    15  
    16 MyAtom::Controller::Root - Root Controller for MyAtom 
    17  
    18 =head1 DESCRIPTION 
    19  
    20 [enter your description here] 
    21  
    22 =head1 METHODS 
    23  
    24 =cut 
    25  
    26 =head2 default 
    27  
    28 =cut 
    29  
    3014sub default : Private { 
    3115    my ( $self, $c ) = @_; 
     
    3519} 
    3620 
    37 =head2 end 
    38  
    39 Attempt to render a view, if needed. 
    40  
    41 =cut  
    42  
    4321sub end : ActionClass('RenderView') {} 
    4422 
    45 =head1 AUTHOR 
    46  
    47 Takeru INOUE,,, 
    48  
    49 =head1 LICENSE 
    50  
    51 This library is free software, you can redistribute it and/or modify 
    52 it under the same terms as Perl itself. 
    53  
    54 =cut 
    55  
    56231; 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/lib/MyAtom/Model/DBIC.pm

    r1860 r2805  
    88    schema_class => 'MyAtom::Model::Schema', 
    99    connect_info => [ 
    10         'dbi:mysql:test', 
    11         'test', 
    12         'test', 
    13          
     10        'dbi:SQLite:dbname=atom.db', 
    1411    ], 
    1512); 
    1613 
    17 =head1 NAME 
    18  
    19 MyAtom::Model::DBIC - Catalyst DBIC Schema Model 
    20 =head1 SYNOPSIS 
    21  
    22 See L<MyAtom> 
    23  
    24 =head1 DESCRIPTION 
    25  
    26 L<Catalyst::Model::DBIC::Schema> Model using schema L<MyAtom::Model::Schema> 
    27  
    28 =head1 AUTHOR 
    29  
    30 Takeru INOUE,,, 
    31  
    32 =head1 LICENSE 
    33  
    34 This library is free software, you can redistribute it and/or modify 
    35 it under the same terms as Perl itself. 
    36  
    37 =cut 
    38  
    39141; 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyAtom/t/01.t

    r1860 r2805  
    1111use XML::Atom::Entry; 
    1212 
    13 my $db = my $user = my $pass = 'test'; 
    14 system "mysql -u $user -p$pass $db < $FindBin::Bin/../init.sql" || die; 
     13system "sqlite3 $FindBin::Bin/../atom.db < $FindBin::Bin/../init.sql" || die; 
    1514 
    1615 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/init.sql

    r1860 r2805  
    44 
    55CREATE TABLE entries ( 
    6   id            INT             AUTO_INCREMENT, 
    7   edited        TIMESTAMP, 
     6  id            INTEGER PRIMARY KEY, 
     7  edited        INTEGER, 
    88 
    9   uri           VARCHAR(255)    NOT NULL, 
    10   etag          VARCHAR(255), 
    11   body          TEXT            NOT NULL,       # XML 
     9  uri           TEXT, 
     10  etag          TEXT, 
     11  body          TEXT,   -- XML 
    1212 
    13   PRIMARY KEY(id), 
    1413  UNIQUE(uri) 
    1514); 
    1615 
    1716CREATE TABLE medias ( 
    18   id            INT             AUTO_INCREMENT, 
    19   edited        TIMESTAMP, 
     17  id            INTEGER PRIMARY KEY, 
     18  edited        INTEGER, 
    2019 
    21   entry_uri     VARCHAR(255)    NOT NULL, 
    22   entry_etag    VARCHAR(255), 
    23   entry_body    TEXT            NOT NULL,       # XML 
     20  entry_uri     TEXT, 
     21  entry_etag    TEXT, 
     22  entry_body    TEXT,   -- XML 
    2423 
    25   media_uri     VARCHAR(255)    NOT NULL, 
    26   media_etag    VARCHAR(255), 
    27   media_body    TEXT            NOT NULL,       # Base64 
    28   media_type    VARCHAR(32)     NOT NULL, 
     24  media_uri     TEXT, 
     25  media_etag    TEXT, 
     26  media_body    TEXT,   -- Base64 
     27  media_type    TEXT, 
    2928 
    30   PRIMARY KEY(id), 
    3129  UNIQUE(entry_uri) 
    3230); 
     
    3432 
    3533CREATE TABLE users ( 
    36   id            INT             AUTO_INCREMENT, 
    37   created_on    TIMESTAMP, 
     34  id            INTEGER PRIMARY KEY, 
     35  created_on    INTEGER, 
    3836 
    39   username      VARCHAR(32)     NOT NULL, 
    40   password      VARCHAR(32)     NOT NULL, 
     37  username      TEXT, 
     38  password      TEXT, 
    4139 
    42   PRIMARY KEY(id), 
    4340  UNIQUE(username) 
    4441); 
     
    5249  'acbd18db4cc2f85cedef654fccc4a4d8' 
    5350); 
    54  
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog.pm

    r1860 r2805  
    4141__PACKAGE__->setup; 
    4242 
    43  
    44 =head1 NAME 
    45  
    46 MyBlog - Catalyst based application 
    47  
    48 =head1 SYNOPSIS 
    49  
    50     script/myblog_server.pl 
    51  
    52 =head1 DESCRIPTION 
    53  
    54 [enter your description here] 
    55  
    56 =head1 SEE ALSO 
    57  
    58 L<MyBlog::Controller::Root>, L<Catalyst> 
    59  
    60 =head1 AUTHOR 
    61  
    62 Takeru INOUE,,, 
    63  
    64 =head1 LICENSE 
    65  
    66 This library is free software, you can redistribute it and/or modify 
    67 it under the same terms as Perl itself. 
    68  
    69 =cut 
    70  
    71431; 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog/Controller/EntryCollection.pm

    r1860 r2805  
    6464 
    6565    my $vals = { 
    66         edited => $self->edited->iso, 
     66        edited => $self->edited->epoch, 
    6767        uri    => $uri, 
    6868        etag   => $self->calculate_new_etag( $c, $uri ), 
     
    100100 
    101101    my $vals = { 
    102         edited => $self->edited->iso, 
     102        edited => $self->edited->epoch, 
    103103        uri    => $uri, 
    104104        etag   => $self->calculate_new_etag( $c, $uri ), 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog/Controller/Html.pm

    r1860 r2805  
    55use warnings; 
    66use base 'Catalyst::Controller'; 
    7  
    8 =head1 NAME 
    9  
    10 MyBlog::Controller::Html - Catalyst Controller 
    11  
    12 =head1 DESCRIPTION 
    13  
    14 Catalyst Controller. 
    15  
    16 =head1 METHODS 
    17  
    18 =cut 
    19  
    20  
    21 =head2 index  
    22  
    23 =cut 
    247 
    258use Atompub::DateTime qw( datetime ); 
     
    8568} 
    8669 
    87  
    88 =head1 AUTHOR 
    89  
    90 Takeru INOUE,,, 
    91  
    92 =head1 LICENSE 
    93  
    94 This library is free software, you can redistribute it and/or modify 
    95 it under the same terms as Perl itself. 
    96  
    97 =cut 
    98  
    99701; 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog/Controller/MediaCollection.pm

    r1860 r2805  
    6464 
    6565    my $vals = { 
    66         edited     => $self->edited->iso, 
     66        edited     => $self->edited->epoch, 
    6767        entry_uri  => $entry_uri, 
    6868        entry_etag => $self->calculate_new_etag( $c, $entry_uri ), 
     
    114114        || return $self->error( $c, RC_NOT_FOUND ); 
    115115 
    116     my $vals = { edited => $self->edited->iso }; 
     116    my $vals = { edited => $self->edited->epoch }; 
    117117 
    118118    if ( $rs->entry_uri eq $uri ) { 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog/Controller/Root.pm

    r1860 r2805  
    1212__PACKAGE__->config->{namespace} = ''; 
    1313 
    14 =head1 NAME 
    15  
    16 MyBlog::Controller::Root - Root Controller for MyBlog 
    17  
    18 =head1 DESCRIPTION 
    19  
    20 [enter your description here] 
    21  
    22 =head1 METHODS 
    23  
    24 =cut 
    25  
    2614sub auto :Private { 
    2715    my ( $self, $c ) = @_; 
     
    3624} 
    3725 
    38 =head2 default 
    39  
    40 =cut 
    41  
    4226sub default : Private { 
    4327    my ( $self, $c ) = @_; 
     
    4529} 
    4630 
    47 =head2 end 
    48  
    49 Attempt to render a view, if needed. 
    50  
    51 =cut  
    52  
    5331sub end : ActionClass('RenderView') {} 
    5432 
    55 =head1 AUTHOR 
    56  
    57 Takeru INOUE,,, 
    58  
    59 =head1 LICENSE 
    60  
    61 This library is free software, you can redistribute it and/or modify 
    62 it under the same terms as Perl itself. 
    63  
    64 =cut 
    65  
    66331; 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/lib/MyBlog/View/TT.pm

    r1860 r2805  
    1818}); 
    1919 
    20 =head1 NAME 
    21  
    22 MyBlog::View::TT - Catalyst TTSite View 
    23  
    24 =head1 SYNOPSIS 
    25  
    26 See L<MyBlog> 
    27  
    28 =head1 DESCRIPTION 
    29  
    30 Catalyst TTSite View. 
    31  
    32 =head1 AUTHOR 
    33  
    34 Takeru INOUE,,, 
    35  
    36 =head1 LICENSE 
    37  
    38 This library is free software, you can redistribute it and/or modify 
    39 it under the same terms as Perl itself. 
    40  
    41 =cut 
    42  
    43201; 
    4421 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/myblog.yml

    r1860 r2805  
    3535    schema_class: MyBlog::Model::Schema 
    3636    connect_info: 
    37         - dbi:mysql:test 
    38         - test 
    39         - test 
     37        - dbi:SQLite:dbname=atom.db 
    4038 
    4139authentication: 
  • lang/perl/Catalyst-Controller-Atompub/trunk/samples/MyBlog/t/01.t

    r1860 r2805  
    1212use XML::Atom::Entry; 
    1313 
    14 my $db = my $user = my $pass = 'test'; 
    15 system "mysql -u $user -p$pass $db < $FindBin::Bin/../init.sql" || die; 
     14system "sqlite3 $FindBin::Bin/../atom.db < $FindBin::Bin/../init.sql" || die; 
    1615 
    1716