Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/00.load.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/00.load.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/00.load.t (revision 1860)
@@ -0,0 +1,7 @@
+use Test::More tests => 1;
+
+BEGIN {
+use_ok( 'Catalyst::Controller::Atompub' );
+}
+
+diag( "Testing Catalyst::Controller::Atompub $Catalyst::Controller::Atompub::VERSION" );
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/02.service.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/02.service.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/02.service.t (revision 1860)
@@ -0,0 +1,71 @@
+use strict;
+use warnings;
+#use Data::Dumper; $Data::Dumper::Indent = 1;
+use Test::More tests => 18;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::WWW::Mechanize::Catalyst 'TestAtompub';
+
+use Atompub::MediaType qw( media_type );
+use XML::Atom::Service;
+
+TestAtompub->config->{'Controller::Service'} = {
+    workspace => [ {
+	title => 'My Blog',
+	collection => [ qw( Controller::Collection ) ],
+    } ]
+};
+
+TestAtompub->config->{'Controller::Collection'} = {
+    collection => {
+	title => 'Diary',
+	categories => [ {
+	    fixed => 'yes',
+	    scheme => 'http://example.com/cats/big3',
+	    category => [ { term => 'animal',
+			    label => 'animal' },
+			  { term => 'vegetable',
+			    label => 'vegetable' },
+			  { term => 'mineral',
+			    scheme => 'http://example.com/dogs/big3',
+			    label => 'mineral' } ],
+	} ],
+    }
+};
+
+my $mech = Test::WWW::Mechanize::Catalyst->new;
+
+$mech->get_ok('/service');
+
+ok media_type( $mech->res->content_type )->is_a('service');
+
+my $serv = XML::Atom::Service->new( \$mech->res->content );
+isa_ok $serv, 'XML::Atom::Service';
+
+my @work = $serv->workspaces;
+is @work, 1;
+is $work[0]->title, 'My Blog';
+
+my @coll = $work[0]->collections;
+is @coll, 1;
+
+is $coll[0]->title, 'Diary';
+is $coll[0]->href, 'http://localhost/collection';
+
+my @cats = $coll[0]->categories;
+is @cats, 1;
+
+is $cats[0]->fixed, 'yes';
+is $cats[0]->scheme, 'http://example.com/cats/big3';
+
+my @cat = $cats[0]->category;
+is @cat, 3;
+
+is $cat[0]->term, 'animal';
+is $cat[0]->label, 'animal';
+is $cat[1]->term, 'vegetable';
+is $cat[1]->label, 'vegetable';
+is $cat[2]->term, 'mineral';
+is $cat[2]->scheme, 'http://example.com/dogs/big3';
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/perlcritic.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/perlcritic.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/perlcritic.t (revision 1860)
@@ -0,0 +1,9 @@
+#!perl
+
+if (!require Test::Perl::Critic) {
+    Test::More::plan(
+        skip_all => "Test::Perl::Critic required for testing PBP compliance"
+    );
+}
+
+Test::Perl::Critic::all_critic_ok();
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/01.service-default.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/01.service-default.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/01.service-default.t (revision 1860)
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+#use Data::Dumper; $Data::Dumper::Indent = 1;
+use Test::More tests => 8;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::WWW::Mechanize::Catalyst 'TestAtompub';
+
+use Atompub::MediaType qw( media_type );
+use XML::Atom::Service;
+
+my $mech = Test::WWW::Mechanize::Catalyst->new;
+
+$mech->get_ok('/service');
+
+ok media_type( $mech->res->content_type )->is_a('service');
+
+my $serv = XML::Atom::Service->new( \$mech->res->content );
+isa_ok $serv, 'XML::Atom::Service';
+
+my @work = $serv->workspaces;
+is @work, 1;
+is $work[0]->title, 'TestAtompub';
+
+my @coll = $work[0]->collections;
+is @coll, 1;
+
+is $coll[0]->title, 'Collection';
+is $coll[0]->href, 'http://localhost/collection';
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/pod.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/pod.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/pod.t (revision 1860)
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/lib/TestAtompub.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/lib/TestAtompub.pm (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/lib/TestAtompub.pm (revision 1860)
@@ -0,0 +1,62 @@
+package TestAtompub;
+
+use strict;
+use warnings;
+
+use Catalyst::Runtime '5.70';
+
+# Set flags and add plugins for the application
+#
+#         -Debug: activates the debug mode for very useful log messages
+#   ConfigLoader: will load the configuration from a YAML file in the
+#                 application's home directory
+# Static::Simple: will serve static files from the application's root 
+#                 directory
+
+use Catalyst qw/-Debug ConfigLoader Static::Simple/;
+
+our $VERSION = '0.01';
+
+# Configure the application. 
+#
+# Note that settings in AtompubServer.yml (or other external
+# configuration file that you set up manually) take precedence
+# over this when using ConfigLoader. Thus configuration
+# details given here can function as a default configuration,
+# with a external configuration file acting as an override for
+# local deployment.
+
+__PACKAGE__->config( name => 'AtompubServer' );
+
+# Start the application
+__PACKAGE__->setup;
+
+
+=head1 NAME
+
+AtompubServer - Catalyst based application
+
+=head1 SYNOPSIS
+
+    script/atompubserver_server.pl
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 SEE ALSO
+
+L<AtompubServer::Controller::Root>, L<Catalyst>
+
+=head1 AUTHOR
+
+Takeru INOUE,,,
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/lib/TestAtompub/Controller/Collection.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/lib/TestAtompub/Controller/Collection.pm (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/lib/TestAtompub/Controller/Collection.pm (revision 1860)
@@ -0,0 +1,38 @@
+package TestAtompub::Controller::Collection;
+
+use strict;
+use warnings;
+
+use XML::Atom::Entry;
+
+use base qw( Catalyst::Controller::Atompub::Collection );
+
+sub get_feed :Atompub(list) {
+    my ( $self, $c ) = @_;
+    $self->collection_resource->body->add_entry( $self->_make_entry );
+    return $self;
+}
+
+sub get_resource :Atompub(read) {
+    my ( $self, $c ) = @_;
+    $self->entry_resource->body( $self->_make_entry );
+    return $self;
+}
+
+sub _make_entry {
+    my $entry = XML::Atom::Entry->new;
+
+    my $link = XML::Atom::Link->new;
+    $link->rel('edit');
+    $link->href('http://localhost/collection/entry_1.atom');
+    $entry->add_link( $link );
+
+    $entry->edited('2007-01-01T00:00:00Z');
+    $entry->updated('2007-01-01T00:00:00Z');
+    $entry->title('Entry 1');
+    $entry->content('This is the 1st entry');
+
+    return $entry;
+}
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/lib/TestAtompub/Controller/Service.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/lib/TestAtompub/Controller/Service.pm (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/lib/TestAtompub/Controller/Service.pm (revision 1860)
@@ -0,0 +1,8 @@
+package TestAtompub::Controller::Service;
+
+use strict;
+use warnings;
+
+use base qw( Catalyst::Controller::Atompub::Service );
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/pod-coverage.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/pod-coverage.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/pod-coverage.t (revision 1860)
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+all_pod_coverage_ok();
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/03.collection.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/03.collection.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/t/03.collection.t (revision 1860)
@@ -0,0 +1,42 @@
+use strict;
+use warnings;
+#use Data::Dumper; $Data::Dumper::Indent = 1;
+use Test::More tests => 14;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::WWW::Mechanize::Catalyst 'TestAtompub';
+
+use Atompub::MediaType qw( media_type );
+use XML::Atom::Feed;
+
+my $mech = Test::WWW::Mechanize::Catalyst->new;
+
+$mech->get_ok('/collection');
+
+ok media_type( $mech->res->content_type )->is_a('feed');
+
+my $feed = XML::Atom::Feed->new( \$mech->res->content );
+isa_ok $feed, 'XML::Atom::Feed';
+
+is $feed->title, 'Collection';
+ok $feed->updated;
+is $feed->id, 'http://localhost/collection';
+
+is $feed->link->rel, 'self';
+is $feed->link->href, 'http://localhost/collection';
+
+my @entries = $feed->entries;
+is @entries, 1;
+
+is $entries[0]->title, 'Entry 1';
+
+$mech->get_ok('/collection/entry_1.atom');
+
+ok media_type( $mech->res->content_type )->is_a('entry');
+
+my $entry = XML::Atom::Feed->new( \$mech->res->content );
+isa_ok $entry, 'XML::Atom::Feed';
+
+is $entry->title, 'Entry 1';
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/init.sql
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/init.sql (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/init.sql (revision 2805)
@@ -0,0 +1,9 @@
+DROP TABLE IF EXISTS entries;
+
+CREATE TABLE entries (
+  id		INTEGER	PRIMARY KEY,
+  edited	INTEGER,
+  uri		TEXT,
+  xml		TEXT,
+  UNIQUE(uri)
+);
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/01.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/01.t (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/01.t (revision 2805)
@@ -0,0 +1,105 @@
+use strict;
+use warnings;
+use Data::Dumper; $Data::Dumper::Indent = 1;
+use Test::More tests => 38;
+
+use Atompub::Client;
+use Atompub::MediaType qw( media_type );
+use File::Slurp;
+use FindBin;
+use HTTP::Status;
+use XML::Atom::Entry;
+
+system "sqlite3 $FindBin::Bin/../atom.db < $FindBin::Bin/../init.sql" || die;
+
+
+my $client = Atompub::Client->new;
+
+
+# Service
+
+my $serv = $client->getService('http://localhost:3000/myservice');
+isa_ok $serv, 'XML::Atom::Service';
+
+my @work = $serv->workspaces;
+is @work, 1;
+
+is $work[0]->title, 'MyAtom';
+
+my @coll = $work[0]->collections;
+is @coll, 1;
+
+is $coll[0]->title, 'MyCollection';
+is $coll[0]->href, 'http://localhost:3000/mycollection';
+
+
+# Create Entry Resource
+
+my $entry = XML::Atom::Entry->new;
+$entry->title('Entry 1');
+$entry->content('This is the 1st entry');
+
+ok my $uri = $client->createEntry( $coll[0]->href, $entry, 'Entry 1' );
+is $uri, 'http://localhost:3000/mycollection/entry_1.atom';
+
+is $client->res->code, RC_CREATED;
+is $client->res->location, 'http://localhost:3000/mycollection/entry_1.atom';
+ok media_type( $client->res->content_type )->is_a('entry');
+
+$entry = $client->rc;
+is $entry->title, 'Entry 1';
+is $entry->id, 'http://localhost:3000/mycollection/entry_1.atom';
+is $entry->link->href, 'http://localhost:3000/mycollection/entry_1.atom';
+ok $entry->edited;
+ok $entry->updated;
+like $entry->content->body, qr{This is the 1st entry};
+
+
+# List Entry Resources
+
+ok my $feed = $client->getFeed( $coll[0]->href );
+
+is $client->res->code, RC_OK;
+ok media_type( $client->res->content_type )->is_a('feed');
+
+is $feed->title, 'MyCollection';
+ok $feed->updated;
+is $feed->id, 'http://localhost:3000/mycollection';
+
+is $feed->link->rel, 'self';
+is $feed->link->href, 'http://localhost:3000/mycollection';
+
+my @entries = $feed->entries;
+is @entries, 1;
+is $entries[0]->title, 'Entry 1';
+
+
+# Read Entry Resource
+
+ok $entry = $client->getEntry( $uri );
+
+is $client->res->code, RC_OK;
+ok media_type( $client->res->content_type )->is_a('entry');
+
+is $entry->title, 'Entry 1';
+
+
+# Update Entry Resource
+
+$entry->title('Entry 1, ver.2');
+
+ok $client->updateEntry( $uri, $entry );
+
+is $client->res->code, RC_OK;
+ok media_type( $client->res->content_type )->is_a('entry');
+
+$entry = $client->rc;
+is $entry->title, 'Entry 1, ver.2';
+
+
+# Delete Entry Resource
+
+ok $client->deleteEntry( $uri );
+
+ok $feed = $client->getFeed( $coll[0]->href );
+ok ! $feed->entries;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/01app.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/01app.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/01app.t (revision 1860)
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+BEGIN { use_ok 'Catalyst::Test', 'MyAtom' }
+
+ok( request('/')->is_success, 'Request should succeed' );
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/03podcoverage.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/03podcoverage.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/03podcoverage.t (revision 1860)
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_coverage_ok();
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/model_DBIC.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/model_DBIC.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/model_DBIC.t (revision 1860)
@@ -0,0 +1,6 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+BEGIN { use_ok 'MyAtom::Model::DBIC' }
+
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/02pod.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/02pod.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/02pod.t (revision 1860)
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod 1.14";
+plan skip_all => 'Test::Pod 1.14 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_files_ok();
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/controller_MyCollection.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/controller_MyCollection.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/controller_MyCollection.t (revision 1860)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'MyAtom' }
+BEGIN { use_ok 'MyAtom::Controller::MyCollection' }
+
+ok( request('/mycollection')->is_success, 'Request should succeed' );
+
+
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/controller_MyService.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/controller_MyService.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/t/controller_MyService.t (revision 1860)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'MyAtom' }
+BEGIN { use_ok 'MyAtom::Controller::MyService' }
+
+ok( request('/myservice')->is_success, 'Request should succeed' );
+
+
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_test.pl
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_test.pl (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_test.pl (revision 1860)
@@ -0,0 +1,54 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Catalyst::Test 'MyAtom';
+
+my $help = 0;
+
+GetOptions( 'help|?' => \$help );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+print request($ARGV[0])->content . "\n";
+
+1;
+
+=head1 NAME
+
+myatom_test.pl - Catalyst Test
+
+=head1 SYNOPSIS
+
+myatom_test.pl [options] uri
+
+ Options:
+   -help    display this help and exits
+
+ Examples:
+   myatom_test.pl http://localhost/some_action
+   myatom_test.pl /some_action
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst action from the command line.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_fastcgi.pl
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_fastcgi.pl (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_fastcgi.pl (revision 1860)
@@ -0,0 +1,80 @@
+#!/usr/bin/perl -w
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use MyAtom;
+
+my $help = 0;
+my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr );
+ 
+GetOptions(
+    'help|?'      => \$help,
+    'listen|l=s'  => \$listen,
+    'nproc|n=i'   => \$nproc,
+    'pidfile|p=s' => \$pidfile,
+    'manager|M=s' => \$manager,
+    'daemon|d'    => \$detach,
+    'keeperr|e'   => \$keep_stderr,
+);
+
+pod2usage(1) if $help;
+
+MyAtom->run( 
+    $listen, 
+    {   nproc   => $nproc,
+        pidfile => $pidfile, 
+        manager => $manager,
+        detach  => $detach,
+	keep_stderr => $keep_stderr,
+    }
+);
+
+1;
+
+=head1 NAME
+
+myatom_fastcgi.pl - Catalyst FastCGI
+
+=head1 SYNOPSIS
+
+myatom_fastcgi.pl [options]
+ 
+ Options:
+   -? -help      display this help and exits
+   -l -listen    Socket path to listen on
+                 (defaults to standard input)
+                 can be HOST:PORT, :PORT or a
+                 filesystem path
+   -n -nproc     specify number of processes to keep
+                 to serve requests (defaults to 1,
+                 requires -listen)
+   -p -pidfile   specify filename for pid file
+                 (requires -listen)
+   -d -daemon    daemonize (requires -listen)
+   -M -manager   specify alternate process manager
+                 (FCGI::ProcManager sub-class)
+                 or empty string to disable
+   -e -keeperr   send error messages to STDOUT, not
+                 to the webserver
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as fastcgi.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_cgi.pl
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_cgi.pl (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_cgi.pl (revision 1860)
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
+
+use strict;
+use warnings;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use MyAtom;
+
+MyAtom->run;
+
+1;
+
+=head1 NAME
+
+myatom_cgi.pl - Catalyst CGI
+
+=head1 SYNOPSIS
+
+See L<Catalyst::Manual>
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as a cgi script.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+
+=head1 COPYRIGHT
+
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_create.pl
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_create.pl (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_create.pl (revision 1860)
@@ -0,0 +1,74 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use Catalyst::Helper;
+
+my $force = 0;
+my $mech  = 0;
+my $help  = 0;
+
+GetOptions(
+    'nonew|force'    => \$force,
+    'mech|mechanize' => \$mech,
+    'help|?'         => \$help
+ );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
+
+pod2usage(1) unless $helper->mk_component( 'MyAtom', @ARGV );
+
+1;
+
+=head1 NAME
+
+myatom_create.pl - Create a new Catalyst Component
+
+=head1 SYNOPSIS
+
+myatom_create.pl [options] model|view|controller name [helper] [options]
+
+ Options:
+   -force        don't create a .new file where a file to be created exists
+   -mechanize    use Test::WWW::Mechanize::Catalyst for tests if available
+   -help         display this help and exits
+
+ Examples:
+   myatom_create.pl controller My::Controller
+   myatom_create.pl -mechanize controller My::Controller
+   myatom_create.pl view My::View
+   myatom_create.pl view MyView TT
+   myatom_create.pl view TT TT
+   myatom_create.pl model My::Model
+   myatom_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
+   dbi:SQLite:/tmp/my.db
+   myatom_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
+   dbi:Pg:dbname=foo root 4321
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Create a new Catalyst Component.
+
+Existing component files are not overwritten.  If any of the component files
+to be created already exist the file will be written with a '.new' suffix.
+This behavior can be suppressed with the C<-force> option.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_server.pl
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_server.pl (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/script/myatom_server.pl (revision 1860)
@@ -0,0 +1,111 @@
+#!/usr/bin/perl -w
+
+BEGIN { 
+    $ENV{CATALYST_ENGINE} ||= 'HTTP';
+    $ENV{CATALYST_SCRIPT_GEN} = 30;
+    require Catalyst::Engine::HTTP;
+}  
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+my $debug             = 0;
+my $fork              = 0;
+my $help              = 0;
+my $host              = undef;
+my $port              = 3000;
+my $keepalive         = 0;
+my $restart           = 0;
+my $restart_delay     = 1;
+my $restart_regex     = '\.yml$|\.yaml$|\.pm$';
+my $restart_directory = undef;
+
+my @argv = @ARGV;
+
+GetOptions(
+    'debug|d'             => \$debug,
+    'fork'                => \$fork,
+    'help|?'              => \$help,
+    'host=s'              => \$host,
+    'port=s'              => \$port,
+    'keepalive|k'         => \$keepalive,
+    'restart|r'           => \$restart,
+    'restartdelay|rd=s'   => \$restart_delay,
+    'restartregex|rr=s'   => \$restart_regex,
+    'restartdirectory=s'  => \$restart_directory,
+);
+
+pod2usage(1) if $help;
+
+if ( $restart ) {
+    $ENV{CATALYST_ENGINE} = 'HTTP::Restarter';
+}
+if ( $debug ) {
+    $ENV{CATALYST_DEBUG} = 1;
+}
+
+# This is require instead of use so that the above environment
+# variables can be set at runtime.
+require MyAtom;
+
+MyAtom->run( $port, $host, {
+    argv              => \@argv,
+    'fork'            => $fork,
+    keepalive         => $keepalive,
+    restart           => $restart,
+    restart_delay     => $restart_delay,
+    restart_regex     => qr/$restart_regex/,
+    restart_directory => $restart_directory,
+} );
+
+1;
+
+=head1 NAME
+
+myatom_server.pl - Catalyst Testserver
+
+=head1 SYNOPSIS
+
+myatom_server.pl [options]
+
+ Options:
+   -d -debug          force debug mode
+   -f -fork           handle each request in a new process
+                      (defaults to false)
+   -? -help           display this help and exits
+      -host           host (defaults to all)
+   -p -port           port (defaults to 3000)
+   -k -keepalive      enable keep-alive connections
+   -r -restart        restart when files get modified
+                      (defaults to false)
+   -rd -restartdelay  delay between file checks
+   -rr -restartregex  regex match files that trigger
+                      a restart when modified
+                      (defaults to '\.yml$|\.yaml$|\.pm$')
+   -restartdirectory  the directory to search for
+                      modified files
+                      (defaults to '../')
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst Testserver for this application.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom.pm (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom.pm (revision 2805)
@@ -0,0 +1,35 @@
+package	# hide from PAUSE
+    MyAtom;
+
+use strict;
+use warnings;
+
+use Catalyst::Runtime '5.70';
+
+# Set flags and add plugins for the application
+#
+#         -Debug: activates the debug mode for very useful log messages
+#   ConfigLoader: will load the configuration from a YAML file in the
+#                 application's home directory
+# Static::Simple: will serve static files from the application's root 
+#                 directory
+
+use Catalyst qw/-Debug ConfigLoader Static::Simple/;
+
+our $VERSION = '0.01';
+
+# Configure the application. 
+#
+# Note that settings in MyAtom.yml (or other external
+# configuration file that you set up manually) take precedence
+# over this when using ConfigLoader. Thus configuration
+# details given here can function as a default configuration,
+# with a external configuration file acting as an override for
+# local deployment.
+
+__PACKAGE__->config( name => 'MyAtom' );
+
+# Start the application
+__PACKAGE__->setup;
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/Catalyst
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/Catalyst (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/Catalyst (revision 1860)
@@ -0,0 +1,1 @@
+link ../../../lib/Catalyst
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Model/Schema.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Model/Schema.pm (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Model/Schema.pm (revision 1860)
@@ -0,0 +1,9 @@
+package # hide from PAUSE
+    MyAtom::Model::Schema;
+
+use strict;
+use base qw( DBIx::Class::Schema::Loader );
+
+__PACKAGE__->loader_options( relationships => 1 );
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Model/DBIC.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Model/DBIC.pm (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Model/DBIC.pm (revision 2901)
@@ -0,0 +1,14 @@
+package # hide from PAUSE
+    MyAtom::Model::DBIC;
+
+use strict;
+use base 'Catalyst::Model::DBIC::Schema';
+
+__PACKAGE__->config(
+    schema_class => 'MyAtom::Model::Schema',
+    connect_info => [
+        'dbi:SQLite:dbname=test.db',
+    ],
+);
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Controller/MyService.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Controller/MyService.pm (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Controller/MyService.pm (revision 2805)
@@ -0,0 +1,8 @@
+package # hide from PAUSE
+    MyAtom::Controller::MyService;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller::Atompub::Service';
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Controller/MyCollection.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Controller/MyCollection.pm (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Controller/MyCollection.pm (revision 2805)
@@ -0,0 +1,114 @@
+package # hide from PAUSE
+    MyAtom::Controller::MyCollection;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller::Atompub::Collection';
+
+# List resources in a Feed Document, which must be implemented in
+# the mehtod with "Atompub(list)" attribute
+sub get_feed :Atompub(list) {
+    my ( $self, $c ) = @_;
+
+    # Skeleton of the Feed (XML::Atom::Feed) was prepared by 
+    # C::C::Atompub
+    my $feed = $self->collection_resource->body;
+
+    # Retrieve Entries sorted in descending order
+    my $rs = $c->model('DBIC::Entries')
+               ->search( {}, { order_by => 'edited desc' } );
+
+    # Add Entries to the Feed
+    while ( my $entry_resource = $rs->next ) {
+        my $entry = XML::Atom::Entry->new( \$entry_resource->xml );
+        $feed->add_entry( $entry );
+    }
+
+    # Return true on success
+    return 1;
+}
+
+# Create new Entry in the method with "Atompub(create)" attribute
+sub create_entry :Atompub(create) {
+    my ( $self, $c ) = @_;
+
+    # URI of the new Entry, which was determined by C::C::Atompub
+    my $uri = $self->entry_resource->uri;
+
+    # app:edited element, which was assigned by C::C::Atompub,
+    # is coverted into UNIX time
+    my $edited = $self->edited->epoch;
+
+    # POSTed Entry (XML::Atom::Entry)
+    my $entry = $self->entry_resource->body;
+
+    # Create new Entry
+    $c->model('DBIC::Entries')->create( {
+        uri    => $uri,
+        edited => $edited,
+        xml    => $entry->as_xml,
+    } );
+
+    # Return true on success
+    return 1;
+}
+
+# Search the requested Entry in the method with "Atompub(read)"
+# attribute
+sub get_entry :Atompub(read) {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri;
+
+    # Retrieve the Entry
+    my $rs = $c->model('DBIC::Entries')->find( { uri => $uri } );
+
+    # Set the Entry
+    my $entry = XML::Atom::Entry->new( \$rs->xml );
+    $self->entry_resource->body( $entry );
+
+    # Return true on success
+    return 1;
+}
+
+# Update the requested Entry in the method with "Atompub(update)"
+# attribute
+sub update_entry :Atompub(update) {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri;
+
+    # app:edited element, which was assigned by C::C::Atompub,
+    # is coverted into UNIX time
+    my $edited = $self->edited->epoch;
+
+    # PUTted Entry (XML::Atom::Entry)
+    my $entry = $self->entry_resource->body;
+
+    # Update the Entry
+    $c->model('DBIC::Entries')->find( { uri => $uri } )
+                              ->update( {
+                                  uri => $uri,
+                                  edited => $edited,
+                                  xml => $entry->as_xml,
+                              } );
+
+    # Return true on success
+    return 1;
+}
+
+# Delete the requested Entry in the method with "Atompub(delete)"
+# attribute
+sub delete_entry :Atompub(delete) {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri;
+
+    # Delete the Entry
+    $c->model('DBIC::Entries')->find( { uri => $uri } )->delete;
+
+    # Return true on success
+    return 1;
+}
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Controller/Root.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Controller/Root.pm (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/lib/MyAtom/Controller/Root.pm (revision 2805)
@@ -0,0 +1,23 @@
+package # hide from PAUSE
+    MyAtom::Controller::Root;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+#
+# Sets the actions in this controller to be registered with no prefix
+# so they function identically to actions created in MyApp.pm
+#
+__PACKAGE__->config->{namespace} = '';
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+
+    # Hello World
+    $c->response->body( $c->welcome_message );
+}
+
+sub end : ActionClass('RenderView') {}
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/myatom.yml
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/myatom.yml (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/myatom.yml (revision 1860)
@@ -0,0 +1,2 @@
+---
+name: MyAtom
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/Makefile.PL
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/Makefile.PL (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/Makefile.PL (revision 1860)
@@ -0,0 +1,16 @@
+use inc::Module::Install;
+
+name 'MyAtom';
+all_from 'lib/MyAtom.pm';
+
+requires 'Catalyst' => '5.7010';
+requires 'Catalyst::Plugin::ConfigLoader';
+requires 'Catalyst::Plugin::Static::Simple';
+requires 'Catalyst::Action::RenderView';
+requires 'YAML'; # This should reflect the config file format you've chosen
+                 # See Catalyst::Plugin::ConfigLoader for supported formats
+catalyst;
+
+install_script glob('script/*.pl');
+auto_install;
+WriteAll;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/Changes
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/Changes (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/Changes (revision 1860)
@@ -0,0 +1,4 @@
+This file documents the revision history for Perl extension MyAtom.
+
+0.01  2007-09-11 00:12:43
+        - initial revision, generated by Catalyst
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/README
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/README (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyAtom/README (revision 1860)
@@ -0,0 +1,1 @@
+Run script/myatom_server.pl to test the application.
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/init.sql
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/init.sql (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/init.sql (revision 2805)
@@ -0,0 +1,50 @@
+DROP TABLE IF EXISTS entries;
+DROP TABLE IF EXISTS medias;
+DROP TABLE IF EXISTS users;
+
+CREATE TABLE entries (
+  id		INTEGER	PRIMARY KEY,
+  edited	INTEGER,
+
+  uri		TEXT,
+  etag		TEXT,
+  body		TEXT,	-- XML
+
+  UNIQUE(uri)
+);
+
+CREATE TABLE medias (
+  id		INTEGER	PRIMARY KEY,
+  edited	INTEGER,
+
+  entry_uri	TEXT,
+  entry_etag	TEXT,
+  entry_body	TEXT,	-- XML
+
+  media_uri	TEXT,
+  media_etag	TEXT,
+  media_body	TEXT,	-- Base64
+  media_type	TEXT,
+
+  UNIQUE(entry_uri)
+);
+
+
+CREATE TABLE users (
+  id		INTEGER	PRIMARY KEY,
+  created_on	INTEGER,
+
+  username	TEXT,
+  password	TEXT,
+
+  UNIQUE(username)
+);
+
+INSERT INTO users (
+  username,
+  password
+)
+VALUES (
+  'foo',
+  'acbd18db4cc2f85cedef654fccc4a4d8'
+);
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/wrapper
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/wrapper (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/wrapper (revision 1860)
@@ -0,0 +1,8 @@
+[% IF template.name.match('\.(css|js|txt)');
+     debug("Passing page through as text: $template.name");
+     content;
+   ELSE;
+     debug("Applying HTML page layout wrappers to $template.name\n");
+     content WRAPPER site/html + site/layout;
+   END;
+-%]
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/html
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/html (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/html (revision 1860)
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+  <link rel="service" type="application/atomsvc+xml" href="/service"/>
+  <title>[% template.title or site.title %]</title>
+  <style type="text/css">
+[% PROCESS ttsite.css %]
+  </style>
+ </head>
+ <body>
+[% content %]
+ </body>
+</html>
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/header
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/header (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/header (revision 1860)
@@ -0,0 +1,3 @@
+<!-- BEGIN site/header -->
+<h1 class="title">[% template.title or site.title %]</h1>
+<!-- END site/header -->
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/layout
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/layout (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/layout (revision 1860)
@@ -0,0 +1,7 @@
+<div id="header">[% PROCESS site/header %]</div>
+
+<div id="content">
+[% content %]
+</div>
+
+<div id="footer">[% PROCESS site/footer %]</div>
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/footer
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/footer (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/site/footer (revision 1860)
@@ -0,0 +1,3 @@
+<!-- BEGIN site/footer -->
+<div id="copyright">&copy; [% site.copyright %]</div>
+<!-- END site/footer -->
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/config/url
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/config/url (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/config/url (revision 1860)
@@ -0,0 +1,8 @@
+[% base = Catalyst.req.base;
+
+   site.url = {
+     base    = base
+     home    = "${base}welcome"
+     message = "${base}message"
+   }
+-%]
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/config/main
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/config/main (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/config/main (revision 1860)
@@ -0,0 +1,27 @@
+[% # config/main
+   #
+   # This is the main configuration template which is processed before
+   # any other page, by virtue of it being defined as a PRE_PROCESS 
+   # template.  This is the place to define any extra template variables,
+   # macros, load plugins, and perform any other template setup.
+
+   IF Catalyst.debug;
+     # define a debug() macro directed to Catalyst's log
+     MACRO debug(message) CALL Catalyst.log.debug(message);
+   END;
+
+   # define a data structure to hold sitewide data
+   site = {
+     title     => 'Catalyst::View::TTSite Example Page',
+     copyright => '2007 Takeru INOUE',
+   };
+
+   # load up any other configuration items 
+   PROCESS config/col
+         + config/url;
+
+   # set defaults for variables, etc.
+   DEFAULT 
+     message = 'There is no message';
+
+-%]
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/config/col
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/config/col (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/lib/config/col (revision 1860)
@@ -0,0 +1,21 @@
+[% site.rgb = {
+     black  = '#000000'
+     white  = '#ffffff'
+     grey1  = '#46494c'
+     grey2  = '#c6c9cc'
+     grey3  = '#e3e6ea'
+     red    = '#CC4444'
+     green  = '#66AA66'
+     blue   = '#89b8df'
+     orange = '#f08900'
+   };
+
+   site.col = {
+      page    = site.rgb.white
+      text    = site.rgb.grey1
+      head    = site.rgb.grey3
+      line    = site.rgb.orange
+      message = site.rgb.green
+      error   = site.rgb.red
+   };
+%]
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/error.tt2
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/error.tt2 (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/error.tt2 (revision 1860)
@@ -0,0 +1,10 @@
+[% META title = 'Catalyst/TT Error' %]
+<p>
+  An error has occurred.  We're terribly sorry about that, but it's 
+  one of those things that happens from time to time.  Let's just 
+  hope the developers test everything properly before release...
+</p>
+<p>
+  Here's the error message, on the off-chance that it means something
+  to you: <span class="error">[% error %]</span>
+</p>
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/ttsite.css
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/ttsite.css (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/ttsite.css (revision 1860)
@@ -0,0 +1,63 @@
+
+html {
+    height: 100%;
+}
+
+body { 
+    background-color: [% site.col.page %];
+    color: [% site.col.text %];
+    margin: 0px;
+    padding: 0px;
+    height: 100%;
+}
+
+#header {
+    background-color: [% site.col.head %];
+    border-bottom: 1px solid [% site.col.line %];
+}
+
+#footer {
+    background-color: [% site.col.head %];
+    text-align: center;
+    border-top: 1px solid [% site.col.line %];
+    position: absolute;
+    bottom: 0;
+    left: 0px;
+    width: 100%;
+    padding: 4px;
+}
+
+#content {
+    padding: 10px;
+}
+
+h1.title {
+    padding: 4px;
+    margin: 0px;
+}
+
+.message {
+    color: [% site.col.message %];
+}
+
+.error {
+    color: [% site.col.error %];
+}
+
+.entry {
+    background-color: [% site.col.head %];
+    border: 1px solid [% site.col.line %];
+    margin-left: 10px;
+    padding: 0 10px;
+}
+
+.content {
+    background-color: [% site.col.page %];
+    margin-left: 10px;
+    padding: 10px;
+}
+
+.updated {
+    font-size: 80%;
+    text-align: right;
+}
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/welcome.tt2
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/welcome.tt2 (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/welcome.tt2 (revision 1860)
@@ -0,0 +1,9 @@
+[% META title = 'Catalyst/TT View!' %]
+<p>
+  Yay!  You're looking at a page generated by the Catalyst::View::TT
+  plugin module.
+</p>
+<p>
+  This is the welcome page.  Why not try the equally-exciting 
+  <a href="[% site.url.message %]">Message Page</a>?
+</p>
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/html/index.tt2
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/html/index.tt2 (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/html/index.tt2 (revision 1860)
@@ -0,0 +1,16 @@
+[% META title = 'My Blog' %]
+
+<a href="http://feedvalidator.org/check.cgi?url=http%3A//teahut.sakura.ne.jp%3A3000/entrycollection"><img src="/static/images/valid-atom.png" alt="[Valid Atom 1.0]" title="Validate my Atom 1.0 feed" /></a>
+
+[% FOREACH collection IN collections %]
+ <div>
+  <h2>[% collection.title %]</h2>
+  [% FOREACH entry IN collection.entries %]
+   <div class="entry">
+    <h3>[% entry.title %]</h3>
+    <div class="content">[% entry.content %]</div>
+    <div class="updated">[% entry.updated %]</div>
+   </div>
+  [% END %]
+ </div>
+[% END %]
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/message.tt2
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/message.tt2 (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/root/src/message.tt2 (revision 1860)
@@ -0,0 +1,16 @@
+[% META title = 'Catalyst/TT View!' %]
+<p>
+  Yay!  You're looking at a page generated by the Catalyst::View::TT
+  plugin module.
+</p>
+<p>
+  We have a message for you: <span class="message">[% message %]</span>.
+</p>
+<p>
+  Why not try updating the message?  Go on, it's really exciting, honest!
+</p>
+<form action="[% site.url.message %]"
+      method="POST" enctype="application/x-www-form-urlencoded">
+ <input type="text" name="message" value="[% message %]" />
+ <input type="submit" name="submit" value=" Update Message "/>
+</form>
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/t/01.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/t/01.t (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/t/01.t (revision 2805)
@@ -0,0 +1,238 @@
+use strict;
+use warnings;
+use Data::Dumper; $Data::Dumper::Indent = 1;
+use Test::More tests => 93;
+
+use Atompub::Client;
+use Atompub::DateTime qw( datetime );
+use Atompub::MediaType qw( media_type );
+use File::Slurp;
+use FindBin;
+use HTTP::Status;
+use XML::Atom::Entry;
+
+system "sqlite3 $FindBin::Bin/../atom.db < $FindBin::Bin/../init.sql" || die;
+
+
+my $client = Atompub::Client->new;
+
+$client->username('foo');
+$client->password('foo');
+
+
+# Service
+
+my $serv = $client->getService('http://localhost:3000/service');
+isa_ok $serv, 'XML::Atom::Service';
+
+my @work = $serv->workspaces;
+is @work, 1;
+
+is $work[0]->title, 'My Blog';
+
+my @coll = $work[0]->collections;
+is @coll, 2;
+
+is $coll[0]->title, 'Diary';
+is $coll[0]->href, 'http://localhost:3000/entrycollection';
+
+is $coll[1]->title, 'Photo';
+is $coll[1]->href, 'http://localhost:3000/mediacollection';
+
+
+# Create Entry Resource
+
+my $entry = XML::Atom::Entry->new;
+$entry->title('Entry 1');
+$entry->content('This is the 1st entry');
+
+my $category = XML::Atom::Category->new;
+$category->term('animal');
+$category->scheme('http://example.com/dogs/big3');
+$entry->add_category($category);
+
+ok ! $client->createEntry( $coll[0]->href, $entry, 'Entry 1' );
+like $client->errstr, qr{Forbidden category}i;
+
+$category->scheme('http://example.com/cats/big3');
+
+ok my $uri = $client->createEntry( $coll[0]->href, $entry, 'Entry 1' );
+is $uri, 'http://localhost:3000/entrycollection/entry_1.atom';
+
+is $client->res->code, RC_CREATED;
+is $client->res->location, 'http://localhost:3000/entrycollection/entry_1.atom';
+ok $client->res->etag;
+#ok $client->res->last_modified;
+ok media_type( $client->res->content_type )->is_a('entry');
+
+$entry = $client->rc;
+is $entry->title, 'Entry 1';
+is $entry->id, 'http://localhost:3000/entrycollection/entry_1.atom';
+is $entry->link->href, 'http://localhost:3000/entrycollection/entry_1.atom';
+ok $entry->edited;
+ok $entry->updated;
+is $entry->category->term, 'animal';
+like $entry->content->body, qr{This is the 1st entry};
+
+ok $client->createEntry( $coll[0]->href, $entry, 'Entry 1' ); # same slug
+
+
+# List Entry Resources
+
+ok my $feed = $client->getFeed( $coll[0]->href );
+
+is $client->res->code, RC_OK;
+ok media_type( $client->res->content_type )->is_a('feed');
+
+is $feed->title, 'Diary';
+ok $feed->updated;
+is $feed->id, 'http://localhost:3000/entrycollection';
+
+is $feed->self_link, 'http://localhost:3000/entrycollection';
+is $feed->first_link, 'http://localhost:3000/entrycollection';
+is $feed->next_link, undef;
+
+my @entries = $feed->entries;
+is @entries, 2;
+is $entries[0]->title, 'Entry 1';
+
+
+# Read Entry Resource
+
+ok $entry = $client->getEntry( $uri );
+
+is $client->res->code, RC_NOT_MODIFIED;
+
+
+# Update Entry Resource
+
+$entry->title('Entry 1, ver.2');
+
+ok $client->updateEntry( $uri, $entry );
+
+is $client->res->code, RC_OK;
+ok $client->res->etag;
+#ok $client->res->last_modified;
+ok media_type( $client->res->content_type )->is_a('entry');
+
+$entry = $client->rc;
+is $entry->title, 'Entry 1, ver.2';
+
+
+# Delete Entry Resource
+
+ok $client->deleteEntry( $uri );
+
+ok $feed = $client->getFeed( $coll[0]->href );
+is $feed->entries, 1;
+
+
+# Create Media Resource
+
+ok ! $client->createMedia( $coll[1]->href, 't/samples/media1.gif', 'text/plain', 'Media 1' );
+like $client->errstr, qr{unsupported media type}i;
+
+ok $uri = $client->createMedia( $coll[1]->href, 't/samples/media1.gif', 'image/gif', 'Media 1' );
+is $uri, 'http://localhost:3000/mediacollection/media_1.atom';
+
+is $client->res->code, RC_CREATED;
+is $client->res->location, 'http://localhost:3000/mediacollection/media_1.atom';
+ok $client->res->etag;
+#ok $client->res->last_modified;
+ok media_type( $client->res->content_type )->is_a('entry');
+
+$entry = $client->rc;
+is $entry->title, 'Media 1';
+ok $entry->edited;
+ok $entry->updated;
+is $entry->id, 'http://localhost:3000/mediacollection/media_1.atom';
+
+is $entry->edit_link, 'http://localhost:3000/mediacollection/media_1.atom';
+is my $media_uri = $entry->edit_media_link, 'http://localhost:3000/mediacollection/media_1.gif';
+
+is $entry->content->src, 'http://localhost:3000/mediacollection/media_1.gif';
+
+ok $client->createMedia( $coll[1]->href, 't/samples/media1.gif', 'image/gif',
+			 'Media 1' ); # same slug
+
+
+# List Media Link Entries
+
+ok $feed = $client->getFeed( $coll[1]->href );
+
+is $client->res->code, RC_OK;
+ok media_type( $client->res->content_type )->is_a('feed');
+
+is $feed->title, 'Photo';
+ok $feed->updated;
+is $feed->id, 'http://localhost:3000/mediacollection';
+
+is $feed->self_link, 'http://localhost:3000/mediacollection';
+is $feed->first_link, 'http://localhost:3000/mediacollection';
+is $feed->next_link, undef;
+
+@entries = $feed->entries;
+is @entries, 2;
+is $entries[0]->title, 'Media 1';
+
+
+# Read Media Link Entry
+
+ok $entry = $client->getEntry( $uri );
+
+is $client->res->code, RC_NOT_MODIFIED;
+
+
+# Update Media Link Entry
+
+$entry->title('Media 1, ver.2');
+
+ok $client->updateEntry( $uri, $entry );
+
+is $client->res->code, RC_OK;
+ok $client->res->etag;
+#ok $client->res->last_modified;
+ok media_type( $client->res->content_type )->is_a('entry');
+
+$entry = $client->rc;
+is $entry->title, 'Media 1, ver.2';
+
+
+# Read Media Resource
+
+ok my $media = $client->getMedia( $media_uri );
+
+is $client->res->code, RC_OK;
+ok $client->res->etag;
+#ok $client->res->last_modified;
+
+is $media, read_file( 't/samples/media1.gif', binmode => ':raw' );
+
+ok $client->getMedia( $media_uri );
+is $client->res->code, RC_NOT_MODIFIED;
+
+
+# Update Media Resource
+
+# XXX Entry can not have app:edited, you SHOULD get it from Feed generally
+my $prev_edited = $entry->edited;
+sleep 1;
+
+ok $client->updateMedia( $media_uri, 't/samples/media2.png', 'image/png' );
+
+is $client->res->code, RC_OK;
+ok $client->res->etag;
+#ok $client->res->last_modified;
+
+is $client->rc, read_file( 't/samples/media2.png', binmode => ':raw' );
+
+# XXX Entry can not have app:edited, you SHOULD get it from Feed generally
+ok datetime( $client->getEntry( $uri )->edited ) > datetime( $prev_edited );
+
+
+# Delete Entry Resource
+
+ok $client->deleteMedia( $media_uri );
+
+ok $feed = $client->getFeed( $coll[1]->href );
+is $feed->entries, 1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/t/controller_Html.t
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/t/controller_Html.t (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/t/controller_Html.t (revision 1860)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'MyBlog' }
+BEGIN { use_ok 'MyBlog::Controller::Html' }
+
+ok( request('/html')->is_success, 'Request should succeed' );
+
+
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_test.pl
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_test.pl (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_test.pl (revision 1860)
@@ -0,0 +1,54 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Catalyst::Test 'MyBlog';
+
+my $help = 0;
+
+GetOptions( 'help|?' => \$help );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+print request($ARGV[0])->content . "\n";
+
+1;
+
+=head1 NAME
+
+myblog_test.pl - Catalyst Test
+
+=head1 SYNOPSIS
+
+myblog_test.pl [options] uri
+
+ Options:
+   -help    display this help and exits
+
+ Examples:
+   myblog_test.pl http://localhost/some_action
+   myblog_test.pl /some_action
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst action from the command line.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_fastcgi.pl
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_fastcgi.pl (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_fastcgi.pl (revision 1860)
@@ -0,0 +1,80 @@
+#!/usr/bin/perl -w
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use MyBlog;
+
+my $help = 0;
+my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr );
+ 
+GetOptions(
+    'help|?'      => \$help,
+    'listen|l=s'  => \$listen,
+    'nproc|n=i'   => \$nproc,
+    'pidfile|p=s' => \$pidfile,
+    'manager|M=s' => \$manager,
+    'daemon|d'    => \$detach,
+    'keeperr|e'   => \$keep_stderr,
+);
+
+pod2usage(1) if $help;
+
+MyBlog->run( 
+    $listen, 
+    {   nproc   => $nproc,
+        pidfile => $pidfile, 
+        manager => $manager,
+        detach  => $detach,
+	keep_stderr => $keep_stderr,
+    }
+);
+
+1;
+
+=head1 NAME
+
+myblog_fastcgi.pl - Catalyst FastCGI
+
+=head1 SYNOPSIS
+
+myblog_fastcgi.pl [options]
+ 
+ Options:
+   -? -help      display this help and exits
+   -l -listen    Socket path to listen on
+                 (defaults to standard input)
+                 can be HOST:PORT, :PORT or a
+                 filesystem path
+   -n -nproc     specify number of processes to keep
+                 to serve requests (defaults to 1,
+                 requires -listen)
+   -p -pidfile   specify filename for pid file
+                 (requires -listen)
+   -d -daemon    daemonize (requires -listen)
+   -M -manager   specify alternate process manager
+                 (FCGI::ProcManager sub-class)
+                 or empty string to disable
+   -e -keeperr   send error messages to STDOUT, not
+                 to the webserver
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as fastcgi.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_cgi.pl
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_cgi.pl (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_cgi.pl (revision 1860)
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
+
+use strict;
+use warnings;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use MyBlog;
+
+MyBlog->run;
+
+1;
+
+=head1 NAME
+
+myblog_cgi.pl - Catalyst CGI
+
+=head1 SYNOPSIS
+
+See L<Catalyst::Manual>
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as a cgi script.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+
+=head1 COPYRIGHT
+
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_create.pl
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_create.pl (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_create.pl (revision 1860)
@@ -0,0 +1,74 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use Catalyst::Helper;
+
+my $force = 0;
+my $mech  = 0;
+my $help  = 0;
+
+GetOptions(
+    'nonew|force'    => \$force,
+    'mech|mechanize' => \$mech,
+    'help|?'         => \$help
+ );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
+
+pod2usage(1) unless $helper->mk_component( 'MyBlog', @ARGV );
+
+1;
+
+=head1 NAME
+
+myblog_create.pl - Create a new Catalyst Component
+
+=head1 SYNOPSIS
+
+myblog_create.pl [options] model|view|controller name [helper] [options]
+
+ Options:
+   -force        don't create a .new file where a file to be created exists
+   -mechanize    use Test::WWW::Mechanize::Catalyst for tests if available
+   -help         display this help and exits
+
+ Examples:
+   myblog_create.pl controller My::Controller
+   myblog_create.pl -mechanize controller My::Controller
+   myblog_create.pl view My::View
+   myblog_create.pl view MyView TT
+   myblog_create.pl view TT TT
+   myblog_create.pl model My::Model
+   myblog_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
+   dbi:SQLite:/tmp/my.db
+   myblog_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
+   dbi:Pg:dbname=foo root 4321
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Create a new Catalyst Component.
+
+Existing component files are not overwritten.  If any of the component files
+to be created already exist the file will be written with a '.new' suffix.
+This behavior can be suppressed with the C<-force> option.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_server.pl
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_server.pl (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/script/myblog_server.pl (revision 1860)
@@ -0,0 +1,111 @@
+#!/usr/bin/perl -w
+
+BEGIN { 
+    $ENV{CATALYST_ENGINE} ||= 'HTTP';
+    $ENV{CATALYST_SCRIPT_GEN} = 30;
+    require Catalyst::Engine::HTTP;
+}  
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+my $debug             = 0;
+my $fork              = 0;
+my $help              = 0;
+my $host              = undef;
+my $port              = 3000;
+my $keepalive         = 0;
+my $restart           = 0;
+my $restart_delay     = 1;
+my $restart_regex     = '\.yml$|\.yaml$|\.pm$';
+my $restart_directory = undef;
+
+my @argv = @ARGV;
+
+GetOptions(
+    'debug|d'             => \$debug,
+    'fork'                => \$fork,
+    'help|?'              => \$help,
+    'host=s'              => \$host,
+    'port=s'              => \$port,
+    'keepalive|k'         => \$keepalive,
+    'restart|r'           => \$restart,
+    'restartdelay|rd=s'   => \$restart_delay,
+    'restartregex|rr=s'   => \$restart_regex,
+    'restartdirectory=s'  => \$restart_directory,
+);
+
+pod2usage(1) if $help;
+
+if ( $restart ) {
+    $ENV{CATALYST_ENGINE} = 'HTTP::Restarter';
+}
+if ( $debug ) {
+    $ENV{CATALYST_DEBUG} = 1;
+}
+
+# This is require instead of use so that the above environment
+# variables can be set at runtime.
+require MyBlog;
+
+MyBlog->run( $port, $host, {
+    argv              => \@argv,
+    'fork'            => $fork,
+    keepalive         => $keepalive,
+    restart           => $restart,
+    restart_delay     => $restart_delay,
+    restart_regex     => qr/$restart_regex/,
+    restart_directory => $restart_directory,
+} );
+
+1;
+
+=head1 NAME
+
+myblog_server.pl - Catalyst Testserver
+
+=head1 SYNOPSIS
+
+myblog_server.pl [options]
+
+ Options:
+   -d -debug          force debug mode
+   -f -fork           handle each request in a new process
+                      (defaults to false)
+   -? -help           display this help and exits
+      -host           host (defaults to all)
+   -p -port           port (defaults to 3000)
+   -k -keepalive      enable keep-alive connections
+   -r -restart        restart when files get modified
+                      (defaults to false)
+   -rd -restartdelay  delay between file checks
+   -rr -restartregex  regex match files that trigger
+                      a restart when modified
+                      (defaults to '\.yml$|\.yaml$|\.pm$')
+   -restartdirectory  the directory to search for
+                      modified files
+                      (defaults to '../')
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst Testserver for this application.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/Catalyst
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/Catalyst (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/Catalyst (revision 1860)
@@ -0,0 +1,1 @@
+link ../../../lib/Catalyst
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog.pm (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog.pm (revision 2805)
@@ -0,0 +1,43 @@
+package # hide from PAUSE
+    MyBlog;
+
+use strict;
+use warnings;
+
+use Catalyst::Runtime '5.70';
+
+# Set flags and add plugins for the application
+#
+#         -Debug: activates the debug mode for very useful log messages
+#   ConfigLoader: will load the configuration from a YAML file in the
+#                 application's home directory
+# Static::Simple: will serve static files from the application's root 
+#                 directory
+
+use Catalyst qw(
+    -Debug
+    ConfigLoader
+    Static::Simple
+
+    Authentication
+    Authentication::Store::DBIC
+    Authentication::Credential::HTTP
+);
+
+our $VERSION = '0.01';
+
+# Configure the application. 
+#
+# Note that settings in MyBlog.yml (or other external
+# configuration file that you set up manually) take precedence
+# over this when using ConfigLoader. Thus configuration
+# details given here can function as a default configuration,
+# with a external configuration file acting as an override for
+# local deployment.
+
+__PACKAGE__->config( name => 'MyBlog' );
+
+# Start the application
+__PACKAGE__->setup;
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Model/Schema.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Model/Schema.pm (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Model/Schema.pm (revision 1860)
@@ -0,0 +1,9 @@
+package # hide from PAUSE
+    MyBlog::Model::Schema;
+
+use strict;
+use base qw( DBIx::Class::Schema::Loader );
+
+__PACKAGE__->loader_options( relationships => 1 );
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Model/DBIC.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Model/DBIC.pm (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Model/DBIC.pm (revision 1860)
@@ -0,0 +1,7 @@
+package # hide from PAUSE
+    MyBlog::Model::DBIC;
+
+use strict;
+use base 'Catalyst::Model::DBIC::Schema';
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/Html.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/Html.pm (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/Html.pm (revision 2805)
@@ -0,0 +1,70 @@
+package # hide from PAUSE
+    MyBlog::Controller::Html;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+use Atompub::DateTime qw( datetime );
+use Atompub::MediaType qw( media_type );
+use Atompub::Util qw( is_acceptable_media_type );
+use String::CamelCase qw( camelize );
+
+my $ENTRIES_PER_PAGE = 10;
+my $ENTRY_TABLE_NAME = 'entries';
+my $MEDIA_TABLE_NAME = 'medias';
+
+my $ENTRY_MODEL = join '::', 'DBIC', camelize( $ENTRY_TABLE_NAME );
+my $MEDIA_MODEL = join '::', 'DBIC', camelize( $MEDIA_TABLE_NAME );
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    my @colls;
+
+    my $page = $c->req->param('page') || 1;
+
+    my $attr = {
+	offset   => ( $page - 1 ) * $ENTRIES_PER_PAGE,
+	rows     => $ENTRIES_PER_PAGE,
+	order_by => 'edited desc',
+    };
+
+    my $rs = $c->model( $ENTRY_MODEL )->search( {}, $attr );
+
+    my @entries;
+    while ( my $resource = $rs->next ) {
+	my $entry = XML::Atom::Entry->new( \$resource->body );
+
+	my $uri     = $entry->edit_link;
+	my $title   = qq{<a href="$uri">} . $entry->title . '</a>';
+	my $content = $entry->content->body;
+
+	push @entries, { updated => datetime( $entry->updated )->str,
+			 title   => $title,
+			 content => $content };
+    }
+
+    push @colls, { title => 'Diary', entries => \@entries };
+
+    $rs = $c->model( $MEDIA_MODEL )->search( {}, $attr );
+
+    my @media_link_entries;
+    while ( my $resource = $rs->next ) {
+	my $entry = XML::Atom::Entry->new( \$resource->entry_body );
+
+	my $uri     = $entry->content->src;
+	my $title   = qq{<a href="$uri">} . $entry->title . '</a>';
+	my $content = qq{<a href="$uri"><img src="$uri"/></a>};
+
+	push @media_link_entries, { updated => datetime( $entry->updated )->str,
+				    title   => $title,
+				    content => $content };
+    }
+
+    push @colls, { title => 'Photo', entries => \@media_link_entries };
+
+    $c->stash->{collections} = \@colls;
+}
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/MediaCollection.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/MediaCollection.pm (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/MediaCollection.pm (revision 2805)
@@ -0,0 +1,209 @@
+package # hide from PAUSE
+    MyBlog::Controller::MediaCollection;
+
+use strict;
+use warnings;
+
+use Atompub::DateTime qw( datetime );
+use Atompub::MediaType qw( media_type );
+use MIME::Base64;
+use HTTP::Status;
+use POSIX qw( strftime );
+use String::CamelCase qw( camelize );
+use Time::HiRes qw( gettimeofday );
+
+use base qw( Catalyst::Controller::Atompub::Collection );
+
+my $ENTRIES_PER_PAGE = 10;
+my $TABLE_NAME       = 'medias';
+
+my $MODEL = join '::', 'DBIC', camelize( $TABLE_NAME );
+
+sub get_feed :Atompub(list) {
+    my ( $self, $c ) = @_;
+
+    ## URI without parameters
+    my $uri = $self->collection_resource->uri;
+
+    my $feed = $self->collection_resource->body;
+
+    my $page = $c->req->param('page') || 1;
+
+    my $attr = {
+	offset   => ( $page - 1 ) * $ENTRIES_PER_PAGE,
+	rows     => $ENTRIES_PER_PAGE,
+	order_by => 'edited desc',
+    };
+
+    my $rs = $c->model( $MODEL )->search( {}, $attr );
+
+    while ( my $resource = $rs->next ) {
+	my $entry = XML::Atom::Entry->new( \$resource->entry_body );
+	$feed->add_entry( $entry );
+    }
+
+    $feed->alternate_link( $c->req->base . 'html' );
+    $feed->first_link( $uri );
+    $feed->previous_link( "$uri?page=" . ($page-1) ) if $page > 1;
+    $feed->next_link( "$uri?page=" . ($page+1) ) if $rs->count >= $ENTRIES_PER_PAGE;
+
+    return $self;
+}
+
+sub create_resource :Atompub(create) {
+    my ( $self, $c ) = @_;
+
+    # URIs were determined by C::C::Atompub
+    my $entry_uri = $self->media_link_entry->uri;
+    my $media_uri = $self->media_resource->uri;
+
+    return $self->error( $c, RC_CONFLICT, "Resource name is used (change Slug): $entry_uri" )
+	if $c->model( $MODEL )->search( { entry_uri => $entry_uri } )->count;
+
+    # Edit $entry and $media if needed ...
+
+    my $vals = {
+	edited     => $self->edited->epoch,
+	entry_uri  => $entry_uri,
+	entry_etag => $self->calculate_new_etag( $c, $entry_uri ),
+	entry_body => $self->media_link_entry->body->as_xml,
+	media_uri  => $media_uri,
+	media_etag => $self->calculate_new_etag( $c, $media_uri ),
+	media_body => MIME::Base64::encode( $self->media_resource->body ),
+	media_type => $self->media_resource->type,
+    };
+
+    $c->model( $MODEL )->create( $vals )
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR,
+				'Cannot create new media resource' );
+
+    return $self;
+}
+
+sub get_resource :Atompub(read) {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri;
+
+    my $cond = { '-or' => [ { entry_uri => $uri },
+			    { media_uri => $uri } ] };
+
+    my $rs = $c->model( $MODEL )->search( $cond )->first
+	|| return $self->error( $c, RC_NOT_FOUND );
+
+    if ( $rs->entry_uri eq $uri ) {
+	$self->media_link_entry->body( XML::Atom::Entry->new( \$rs->entry_body ) );
+    }
+    else {
+	$self->media_resource->body( MIME::Base64::decode( $rs->media_body ) );
+	$self->media_resource->type( $rs->media_type );
+    }
+
+    return $self;
+}
+
+sub update_resource :Atompub(update) {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri;
+
+    my $cond = { '-or' => [ { entry_uri => $uri },
+			    { media_uri => $uri } ] };
+
+    my $rs = $c->model( $MODEL )->search( $cond )->first
+	|| return $self->error( $c, RC_NOT_FOUND );
+
+    my $vals = { edited => $self->edited->epoch };
+
+    if ( $rs->entry_uri eq $uri ) {
+	$vals->{entry_etag} = $self->calculate_new_etag( $c, $uri );
+	$vals->{entry_body} = $self->media_link_entry->body->as_xml;
+
+	# Don't update the Last-Modified value of the corresponding Media Resource if you use it
+    }
+    else {
+	# app:edited and atom:updated MUST be updated even when the cooresponding Media Resource is updated
+	my $entry = XML::Atom::Entry->new( \$rs->entry_body )
+	    || return $self->error( $c );
+	$entry->edited( $self->edited->w3c );
+
+	$vals->{entry_etag} = $self->calculate_new_etag( $c, $rs->entry_uri );
+	$vals->{entry_body} = $entry->as_xml;
+
+	$vals->{media_etag} = $self->calculate_new_etag( $c, $rs->media_uri );
+	$vals->{media_body} = MIME::Base64::encode( $self->media_resource->body );
+	$vals->{media_type} = $self->media_resource->type;
+
+	# Do update the Last-Modified value of the Media Resource if you use it
+    }
+
+    $rs->update( $vals )
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR, "Cannot update resource: $uri" );
+
+    return $self;
+}
+
+sub delete_resource :Atompub(delete) {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri;
+
+    my $cond = { '-or' => [ { entry_uri => $uri },
+			    { media_uri => $uri } ] };
+
+    my $rs = $c->model( $MODEL )->search( $cond )->first
+	|| return $self->error( $c, RC_NOT_FOUND );
+
+    # delete entry and media resources at once
+    $rs->delete
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR, "Cannot delete resource: $uri" );
+
+    return $self;
+}
+
+sub make_edit_uri {
+    my ( $self, $c, @args ) = @_;
+
+    my @uris = $self->SUPER::make_edit_uri( $c, @args );
+
+    my $cond = { '-or' => [ { entry_uri => $uris[0] },
+			    { media_uri => $uris[0] } ] };
+
+    # return, if $uris[0] is not used
+    return wantarray ? @uris : $uris[0]
+	unless $c->model( $MODEL )->search( $cond )->count;
+
+    my ( $sec, $usec ) = gettimeofday;
+    my $dt = strftime '%Y%m%d-%H%M%S', localtime( $sec );
+    $usec  = sprintf '%06d', $usec;
+
+    # insert $dt-$usec before extension
+    $_ =~ s{(\.[^./?]+)$}{-$dt-$usec$1} for @uris;
+
+    return @uris;
+}
+
+sub find_version {
+    my ( $self, $c, $uri ) = @_;
+
+    my $cond = { '-or' => [ { entry_uri => $uri },
+			    { media_uri => $uri } ] };
+
+    my $rs = $c->model( $MODEL )->search( $cond )->first || return;
+
+    if ( $rs->entry_uri eq $uri ) {
+	return ( etag => $rs->entry_etag );
+    }
+    else {
+	return ( etag => $rs->media_etag );
+    }
+}
+
+sub calculate_new_etag {
+    my ( $self, $c, $uri ) = @_;
+    my ( $sec, $usec ) = gettimeofday;
+    my $dt = join '-', strftime( '%Y%m%d-%H%M%S', localtime($sec) ), sprintf( '%06d', $usec );
+    join '/', $uri, $dt;
+}
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/EntryCollection.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/EntryCollection.pm (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/EntryCollection.pm (revision 2805)
@@ -0,0 +1,163 @@
+package # hide from PAUSE
+    MyBlog::Controller::EntryCollection;
+
+use strict;
+use warnings;
+
+use Atompub::DateTime qw( datetime );
+use Atompub::MediaType qw( media_type );
+use HTTP::Status;
+use POSIX qw( strftime );
+use String::CamelCase qw( camelize );
+use Time::HiRes qw( gettimeofday );
+
+use base qw( Catalyst::Controller::Atompub::Collection );
+
+my $ENTRIES_PER_PAGE = 10;
+my $TABLE_NAME       = 'entries';
+
+my $MODEL = join '::', 'DBIC', camelize( $TABLE_NAME );
+
+sub get_feed :Atompub(list) {
+    my ( $self, $c ) = @_;
+
+    ## URI without parameters
+    my $uri = $self->collection_resource->uri;
+
+    my $feed = $self->collection_resource->body;
+
+    my $page = $c->req->param('page') || 1;
+
+    my $attr = {
+	offset   => ( $page - 1 ) * $ENTRIES_PER_PAGE,
+	rows     => $ENTRIES_PER_PAGE,
+	order_by => 'edited desc',
+    };
+
+    my $rs = $c->model( $MODEL )->search( {}, $attr );
+
+    while ( my $resource = $rs->next ) {
+	my $entry = XML::Atom::Entry->new( \$resource->body );
+	$feed->add_entry( $entry );
+    }
+
+    $feed->alternate_link( $c->req->base . 'html' );
+    $feed->first_link( $uri );
+    $feed->previous_link( "$uri?page=" . ($page-1) ) if $page > 1;
+    $feed->next_link( "$uri?page=" . ($page+1) ) if $rs->count >= $ENTRIES_PER_PAGE;
+
+    return $self;
+}
+
+sub create_resource :Atompub(create) {
+    my ( $self, $c ) = @_;
+
+    # URI of the new Entry, which was determined by C::C::Atompub
+    my $uri = $self->entry_resource->uri;
+
+    return $self->error( $c, RC_CONFLICT, "Resource name is used (change Slug): $uri" )
+	if $c->model( $MODEL )->find( { uri => $uri } );
+
+    my $entry = $self->entry_resource->body;
+
+    # Edit $entry if needed
+
+    my $vals = {
+	edited => $self->edited->epoch,
+	uri    => $uri,
+	etag   => $self->calculate_new_etag( $c, $uri ),
+	body   => $entry->as_xml,
+    };
+
+    $c->model( $MODEL )->create( $vals )
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR, 'Cannot create new resource' );
+
+    return $self;
+}
+
+sub get_resource :Atompub(read) {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri;
+
+    my $rs = $c->model( $MODEL )->find( { uri => $uri } )
+	|| return $self->error( $c, RC_NOT_FOUND );
+
+    $self->entry_resource->body( XML::Atom::Entry->new( \$rs->body ) );
+
+    return $self;
+}
+
+sub update_resource :Atompub(update) {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri;
+
+    # Edit $entry if needed
+
+    my $rs = $c->model( $MODEL )->find( { uri => $uri } )
+	|| return $self->error( $c, RC_NOT_FOUND );
+
+    my $vals = {
+	edited => $self->edited->epoch,
+	uri    => $uri,
+	etag   => $self->calculate_new_etag( $c, $uri ),
+	body   => $self->entry_resource->body->as_xml,
+    };
+
+    $rs->update( $vals )
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR, "Cannot update resource: $uri" );
+
+    return $self;
+}
+
+sub delete_resource :Atompub(delete) {
+    my ( $self, $c ) = @_;
+
+    my $uri = $c->req->uri;
+
+    my $rs = $c->model( $MODEL )->find( { uri => $uri } )
+	|| return $self->error( $c, RC_NOT_FOUND );
+
+    $rs->delete
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR, "Cannot delete resource: $uri" );
+
+    return $self;
+}
+
+sub make_edit_uri {
+    my ( $self, $c, @args ) = @_;
+
+    my @uris = $self->SUPER::make_edit_uri( $c, @args );
+
+    # return, if $uris[0] is not used
+    return wantarray ? @uris : $uris[0]
+	unless $c->model( $MODEL )->find( { uri => $uris[0] } );
+
+    my ( $sec, $usec ) = gettimeofday;
+    my $dt = strftime '%Y%m%d-%H%M%S', localtime( $sec );
+    $usec  = sprintf '%06d', $usec;
+
+    # insert $dt-$usec before extension
+    $_ =~ s{(\.[^./?]+)$}{-$dt-$usec$1} for @uris;
+
+    return @uris;
+}
+
+sub find_version {
+    my ( $self, $c, $uri ) = @_;
+
+    my $rs = $c->model( $MODEL )->find( { uri => $uri } ) || return;
+
+    return ( etag => $rs->etag );
+#    return ( etag => $rs->etag, last_modified => datetime( $rs->edited )->str );
+}
+
+sub calculate_new_etag {
+    my ( $self, $c, $uri ) = @_;
+    my ( $sec, $usec ) = gettimeofday;
+    my $dt = join '-', strftime( '%Y%m%d-%H%M%S', localtime($sec) ), sprintf( '%06d', $usec );
+    join '/', $uri, $dt;
+}
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/Service.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/Service.pm (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/Service.pm (revision 1860)
@@ -0,0 +1,18 @@
+package # hide from PAUSE
+    MyBlog::Controller::Service;
+
+use strict;
+use warnings;
+
+use base qw( Catalyst::Controller::Atompub::Service );
+
+sub modify_service {
+    my ( $self, $c, $service ) = @_;
+
+    # Edit $service (XML::Atom::Service) if you'd like to modify the 
+    # Service Document
+
+    return $service;
+}
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/Root.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/Root.pm (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/Controller/Root.pm (revision 2805)
@@ -0,0 +1,33 @@
+package # hide from PAUSE
+    MyBlog::Controller::Root;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+#
+# Sets the actions in this controller to be registered with no prefix
+# so they function identically to actions created in MyApp.pm
+#
+__PACKAGE__->config->{namespace} = '';
+
+sub auto :Private {
+    my ( $self, $c ) = @_;
+
+    # authentication not required, if GET
+    return 1 if $c->req->method eq 'GET' || $c->req->method eq 'HEAD';
+
+    my $realm = $c->config->{authentication}{http}{realm};
+    $c->authorization_required( realm => $realm );
+
+    return 1;
+}
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    $c->res->redirect('html');
+}
+
+sub end : ActionClass('RenderView') {}
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/View/TT.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/View/TT.pm (revision 2805)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/lib/MyBlog/View/TT.pm (revision 2805)
@@ -0,0 +1,21 @@
+package # hide from PAUSE
+    MyBlog::View::TT;
+
+use strict;
+use base 'Catalyst::View::TT';
+
+__PACKAGE__->config({
+    CATALYST_VAR => 'Catalyst',
+    INCLUDE_PATH => [
+        MyBlog->path_to( 'root', 'src' ),
+        MyBlog->path_to( 'root', 'lib' )
+    ],
+    PRE_PROCESS  => 'config/main',
+    WRAPPER      => 'site/wrapper',
+    ERROR        => 'error.tt2',
+    TIMER        => 0,
+    TEMPLATE_EXTENSION => '.tt2',
+});
+
+1;
+
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/Makefile.PL
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/Makefile.PL (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/Makefile.PL (revision 1860)
@@ -0,0 +1,16 @@
+use inc::Module::Install;
+
+name 'MyBlog';
+all_from 'lib/MyBlog.pm';
+
+requires 'Catalyst' => '5.7010';
+requires 'Catalyst::Plugin::ConfigLoader';
+requires 'Catalyst::Plugin::Static::Simple';
+requires 'Catalyst::Action::RenderView';
+requires 'YAML'; # This should reflect the config file format you've chosen
+                 # See Catalyst::Plugin::ConfigLoader for supported formats
+catalyst;
+
+install_script glob('script/*.pl');
+auto_install;
+WriteAll;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/Changes
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/Changes (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/Changes (revision 1860)
@@ -0,0 +1,4 @@
+This file documents the revision history for Perl extension MyBlog.
+
+0.01  2007-09-07 14:49:50
+        - initial revision, generated by Catalyst
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/myblog.yml
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/myblog.yml (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/myblog.yml (revision 2901)
@@ -0,0 +1,48 @@
+---
+name: MyBlog
+
+Controller::Service:
+    workspace:
+      - title: My Blog
+        collection:
+          - Controller::EntryCollection
+          - Controller::MediaCollection
+
+Controller::EntryCollection:
+    collection:
+        title: Diary
+        categories:
+          - fixed: yes
+            scheme: http://example.com/cats/big3
+            category:
+              - term: animal
+                label: animal
+              - term: vegetable
+                label: vegetable
+              - term: mineral
+                scheme: http://example.com/dogs/big3
+                label: mineral
+
+Controller::MediaCollection:
+    collection:
+        title: Photo
+        accept:
+          - image/png
+          - image/jpeg
+          - image/gif
+
+Model::DBIC:
+    schema_class: MyBlog::Model::Schema
+    connect_info:
+        - dbi:SQLite:dbname=test.db
+
+authentication:
+    dbic:
+        user_class:         DBIC::User
+        user_field:         username
+        password_field:     password
+        password_type:      hashed
+        password_hash_type: MD5
+    http:
+        type: basic
+        realm: My Blog
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/README
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/README (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/samples/MyBlog/README (revision 1860)
@@ -0,0 +1,1 @@
+Run script/myblog_server.pl to test the application.
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/MANIFEST
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/MANIFEST (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/MANIFEST (revision 2901)
@@ -0,0 +1,104 @@
+Build.PL
+Changes
+MANIFEST
+META.yml # Will be created by "make dist"
+Makefile.PL
+README
+lib/Catalyst/Controller/Atompub.pm
+lib/Catalyst/Controller/Atompub/Base.pm
+lib/Catalyst/Controller/Atompub/Collection.pm
+lib/Catalyst/Controller/Atompub/Service.pm
+lib/Catalyst/Helper/Controller/Atompub/Collection.pm
+lib/Catalyst/Helper/Controller/Atompub/Service.pm
+t/00.load.t
+t/01.service-default.t
+t/02.service.t
+t/03.collection.t
+t/lib/TestAtompub.pm
+t/lib/TestAtompub/Controller/Collection.pm
+t/lib/TestAtompub/Controller/Service.pm
+t/perlcritic.t
+t/pod-coverage.t
+t/pod.t
+samples/MyAtom/Changes
+samples/MyAtom/Makefile.PL
+samples/MyAtom/README
+samples/MyAtom/init.sql
+samples/MyAtom/test.db
+samples/MyAtom/lib/MyAtom.pm
+samples/MyAtom/lib/MyAtom/Controller/MyCollection.pm
+samples/MyAtom/lib/MyAtom/Controller/MyService.pm
+samples/MyAtom/lib/MyAtom/Controller/Root.pm
+samples/MyAtom/lib/MyAtom/Model/DBIC.pm
+samples/MyAtom/lib/MyAtom/Model/Schema.pm
+samples/MyAtom/myatom.yml
+samples/MyAtom/root/favicon.ico
+samples/MyAtom/root/static/images/btn_120x50_built.png
+samples/MyAtom/root/static/images/btn_120x50_built_shadow.png
+samples/MyAtom/root/static/images/btn_120x50_powered.png
+samples/MyAtom/root/static/images/btn_120x50_powered_shadow.png
+samples/MyAtom/root/static/images/btn_88x31_built.png
+samples/MyAtom/root/static/images/btn_88x31_built_shadow.png
+samples/MyAtom/root/static/images/btn_88x31_powered.png
+samples/MyAtom/root/static/images/btn_88x31_powered_shadow.png
+samples/MyAtom/root/static/images/catalyst_logo.png
+samples/MyAtom/script/myatom_cgi.pl
+samples/MyAtom/script/myatom_create.pl
+samples/MyAtom/script/myatom_fastcgi.pl
+samples/MyAtom/script/myatom_server.pl
+samples/MyAtom/script/myatom_test.pl
+samples/MyAtom/t/01.t
+samples/MyAtom/t/01app.t
+samples/MyAtom/t/02pod.t
+samples/MyAtom/t/03podcoverage.t
+samples/MyAtom/t/controller_MyCollection.t
+samples/MyAtom/t/controller_MyService.t
+samples/MyAtom/t/model_DBIC.t
+samples/MyBlog/Changes
+samples/MyBlog/Makefile.PL
+samples/MyBlog/README
+samples/MyBlog/init.sql
+samples/MyBlog/test.db
+samples/MyBlog/lib/MyBlog.pm
+samples/MyBlog/lib/MyBlog/Controller/EntryCollection.pm
+samples/MyBlog/lib/MyBlog/Controller/Html.pm
+samples/MyBlog/lib/MyBlog/Controller/MediaCollection.pm
+samples/MyBlog/lib/MyBlog/Controller/Root.pm
+samples/MyBlog/lib/MyBlog/Controller/Service.pm
+samples/MyBlog/lib/MyBlog/Model/DBIC.pm
+samples/MyBlog/lib/MyBlog/Model/Schema.pm
+samples/MyBlog/lib/MyBlog/View/TT.pm
+samples/MyBlog/myblog.yml
+samples/MyBlog/root/favicon.ico
+samples/MyBlog/root/lib/config/col
+samples/MyBlog/root/lib/config/main
+samples/MyBlog/root/lib/config/url
+samples/MyBlog/root/lib/site/footer
+samples/MyBlog/root/lib/site/header
+samples/MyBlog/root/lib/site/html
+samples/MyBlog/root/lib/site/layout
+samples/MyBlog/root/lib/site/wrapper
+samples/MyBlog/root/src/error.tt2
+samples/MyBlog/root/src/html/index.tt2
+samples/MyBlog/root/src/message.tt2
+samples/MyBlog/root/src/ttsite.css
+samples/MyBlog/root/src/welcome.tt2
+samples/MyBlog/root/static/images/btn_120x50_built.png
+samples/MyBlog/root/static/images/btn_120x50_built_shadow.png
+samples/MyBlog/root/static/images/btn_120x50_powered.png
+samples/MyBlog/root/static/images/btn_120x50_powered_shadow.png
+samples/MyBlog/root/static/images/btn_88x31_built.png
+samples/MyBlog/root/static/images/btn_88x31_built_shadow.png
+samples/MyBlog/root/static/images/btn_88x31_powered.png
+samples/MyBlog/root/static/images/btn_88x31_powered_shadow.png
+samples/MyBlog/root/static/images/catalyst_logo.png
+samples/MyBlog/root/static/images/valid-atom.png
+samples/MyBlog/script/myblog_cgi.pl
+samples/MyBlog/script/myblog_create.pl
+samples/MyBlog/script/myblog_fastcgi.pl
+samples/MyBlog/script/myblog_server.pl
+samples/MyBlog/script/myblog_test.pl
+samples/MyBlog/t/01.t
+samples/MyBlog/t/controller_Html.t
+samples/MyBlog/t/samples/media1.gif
+samples/MyBlog/t/samples/media2.png
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/META.yml
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/META.yml (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/META.yml (revision 2901)
@@ -0,0 +1,60 @@
+---
+name: Catalyst-Controller-Atompub
+version: 0.3.0
+author:
+  - 'Takeru INOUE <takeru.inoue _ gmail.com>'
+abstract: A Catalyst controller for the Atom Publishing Protocol
+license: perl
+resources:
+  license: http://dev.perl.org/licenses/
+requires:
+  Atompub: 0.1.6
+  Catalyst::Helper: 0
+  Catalyst::Plugin::ConfigLoader: 0
+  Catalyst::Runtime: 5.7
+  File::Slurp: 0
+  FindBin: 0
+  HTTP::Status: 0
+  MIME::Base64: 0
+  POSIX: 0
+  Text::CSV: 0
+  Time::HiRes: 0
+  URI::Escape: 0
+  version: 0
+build_requires:
+  Test::More: 0
+  Test::Perl::Critic: 0
+  Test::WWW::Mechanize::Catalyst: 0
+recommends:
+  Catalyst::Action::RenderView: 0
+  Catalyst::Devel: 0
+  Catalyst::Model::DBIC::Schema: 0
+  Catalyst::Plugin::Authentication::Credential::HTTP: 0
+  Catalyst::Plugin::Authentication::Store::DBIC: 0
+  Catalyst::Plugin::Static::Simple: 0.16
+  Catalyst::View::TT: 0
+  DBD::SQLite: 1.13
+  DBIx::Class::Schema::Loader: 0
+  String::CamelCase: 0
+provides:
+  Catalyst::Controller::Atompub:
+    file: lib/Catalyst/Controller/Atompub.pm
+    version: 0.3.0
+  Catalyst::Controller::Atompub::Base:
+    file: lib/Catalyst/Controller/Atompub/Base.pm
+  Catalyst::Controller::Atompub::Collection:
+    file: lib/Catalyst/Controller/Atompub/Collection.pm
+  Catalyst::Controller::Atompub::Collection::Resource:
+    file: lib/Catalyst/Controller/Atompub/Collection.pm
+  Catalyst::Controller::Atompub::Info:
+    file: lib/Catalyst/Controller/Atompub/Base.pm
+  Catalyst::Controller::Atompub::Service:
+    file: lib/Catalyst/Controller/Atompub/Service.pm
+  Catalyst::Helper::Controller::Atompub::Collection:
+    file: lib/Catalyst/Helper/Controller/Atompub/Collection.pm
+  Catalyst::Helper::Controller::Atompub::Service:
+    file: lib/Catalyst/Helper/Controller/Atompub/Service.pm
+generated_by: Module::Build version 0.2808
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.2.html
+  version: 1.2
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Helper/Controller/Atompub/Collection.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Helper/Controller/Atompub/Collection.pm (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Helper/Controller/Atompub/Collection.pm (revision 2901)
@@ -0,0 +1,164 @@
+package Catalyst::Helper::Controller::Atompub::Collection;
+
+use strict;
+use warnings;
+
+sub mk_compclass {
+    my($self, $helper) = @_;
+    $helper->render_file('compclass', $helper->{file});
+}
+
+1;
+
+=head1 NAME
+
+Catalyst::Helper::Controller::Atompub::Collection - Helper for Atom Collection Resources
+
+=head1 SYNOPSIS
+
+    $ perl script/myapp_create.pl controller MyCollection Atompub::Collection
+
+=head1 DESCRIPTION
+
+Helper for the L<Catalyst> Atom Collection Resources.
+See L<Catalyst::Controller::Atompub::Collection>.
+
+=head1 METHODS
+
+=head2 mk_compclass
+
+Makes the Atom Collection Resources class.
+
+=head1 SEE ALSO
+
+L<Catalyst::Controller::Atompub::Collection>
+
+=head1 AUTHOR
+
+Takeru INOUE, E<lt>takeru.inoue _ gmail.comE<gt>
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2007, Takeru INOUE C<< <takeru.inoue _ gmail.com> >>. All rights reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself. See L<perlartistic>.
+
+=head1 DISCLAIMER OF WARRANTY
+
+BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
+YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
+LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+=cut
+
+__DATA__
+
+=begin pod_to_ignore
+
+__compclass__
+package [% class %];
+
+use strict;
+use warnings;
+use base qw(Catalyst::Controller::Atompub::Collection);
+
+# List resources in a Feed Document
+sub get_feed :Atompub(list) {
+    my($self, $c) = @_;
+
+    # Skeleton of the Feed (XML::Atom::Feed) was prepared by C::C::Atompub
+    my $feed = $self->collection_resource->body;
+
+    # Add entries into $feed...
+
+    return 1;
+}
+
+# Create the new Resource
+sub create_resource :Atompub(create) {
+    my($self, $c) = @_;
+
+    # Create the Resource in your Model...
+
+    return 1;
+}
+
+# Search the requested Resource
+sub get_resource :Atompub(read) {
+    my( $self, $c) = @_;
+
+    # Retrieve the Resource...
+
+    return 1;
+}
+
+# Update the requested Resource
+sub update_entry :Atompub(update) {
+    my($self, $c) = @_;
+
+    # Update the Resource...
+
+    return 1;
+}
+
+# Delete the requested Resource
+sub delete_entry :Atompub(delete) {
+    my($self, $c) = @_;
+
+    # Delete the Resource...
+
+    return 1;
+}
+
+# Make EditURI by yourself (it will be automatically generated by default)
+#sub make_edit_uri {
+#    my($self, $c, @args) = @_;
+#}
+
+# Find version information of the Resource for caching and versioning
+#sub find_version {
+#    my($self, $c, $uri) = @_;
+#}
+
+=head1 NAME
+
+[% class %] - Atom Collection Resources
+
+=head1 SYNOPSIS
+
+See L<[% app %]>.
+
+=head1 DESCRIPTION
+
+Atom Collection Resources class.
+
+=head1 AUTHOR
+
+[% author %]
+
+=head1 LICENSE
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Helper/Controller/Atompub/Service.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Helper/Controller/Atompub/Service.pm (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Helper/Controller/Atompub/Service.pm (revision 2901)
@@ -0,0 +1,114 @@
+package Catalyst::Helper::Controller::Atompub::Service;
+
+use strict;
+use warnings;
+
+sub mk_compclass {
+    my($self, $helper) = @_;
+    $helper->render_file('compclass', $helper->{file});
+}
+
+1;
+
+=head1 NAME
+
+Catalyst::Helper::Controller::Atompub::Service - Helper for Atom Service Document
+
+=head1 SYNOPSIS
+
+    $ perl script/myapp_create.pl controller MyService Atompub::Service
+
+=head1 DESCRIPTION
+
+Helper for the L<Catalyst> Atom Service Document.
+See L<Catalyst::Controller::Atompub::Service>.
+
+=head1 METHODS
+
+=head2 mk_compclass
+
+Makes the Atom Service Document class.
+
+=head1 SEE ALSO
+
+L<Catalyst::Controller::Atompub::Service>
+
+=head1 AUTHOR
+
+Takeru INOUE, E<lt>takeru.inoue _ gmail.comE<gt>
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2007, Takeru INOUE C<< <takeru.inoue _ gmail.com> >>. All rights reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself. See L<perlartistic>.
+
+=head1 DISCLAIMER OF WARRANTY
+
+BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
+YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
+LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+=cut
+
+__DATA__
+
+=begin pod_to_ignore
+
+__compclass__
+package [% class %];
+
+use strict;
+use warnings;
+use base qw(Catalyst::Controller::Atompub::Service);
+
+sub modify_service {
+    my($self, $c, $service) = @_;
+
+    # Edit $service
+
+    return $service;
+}
+
+=head1 NAME
+
+[% class %] - Atom Service Document
+
+=head1 SYNOPSIS
+
+See L<[% app %]>.
+
+=head1 DESCRIPTION
+
+Atom Service Document class.
+
+=head1 AUTHOR
+
+[% author %]
+
+=head1 LICENSE
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub.pm (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub.pm (revision 2901)
@@ -0,0 +1,165 @@
+package Catalyst::Controller::Atompub;
+
+use warnings;
+use strict;
+use Carp;
+
+use version; our $VERSION = qv('0.3.0');
+
+use Atompub 0.1.6;
+use Catalyst::Request;
+use Catalyst::Response;
+
+while ( my ( $method, $header ) = each %Atompub::REQUEST_HEADERS ) {
+    no strict 'refs'; ## no critic
+    if ( ! Catalyst::Request->can( $method ) ) {
+	*{ "Catalyst::Request::$method" } = sub { shift->header( $header, @_ ) };
+    }
+}
+
+while ( my ( $method, $header ) = each %Atompub::RESPONSE_HEADERS ) {
+    no strict 'refs'; ## no critic
+    if ( ! Catalyst::Response->can( $method ) ) {
+	*{ "Catalyst::Response::$method" } = sub { shift->header( $header, @_ ) };
+    }
+}
+
+while ( my ( $method, $header ) = each %Atompub::ENTITY_HEADERS ) {
+    no strict 'refs'; ## no critic
+    if ( ! Catalyst::Request->can( $method ) ) {
+	*{ "Catalyst::Request::$method" } = sub { shift->header( $header, @_ ) };
+    }
+    if ( ! Catalyst::Response->can( $method ) ) {
+	*{ "Catalyst::Response::$method" } = sub { shift->header( $header, @_ ) };
+    }
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Catalyst::Controller::Atompub 
+- A Catalyst controller for the Atom Publishing Protocol
+
+
+=head1 DESCRIPTION
+
+L<Catalyst::Controller::Atompub> provides a base class 
+for the Atom Publishing Protocol servers.
+This module handles all core server processing based on the Atom Publishing Protocol
+described at L<http://www.ietf.org/internet-drafts/draft-ietf-atompub-protocol-17.txt>.
+
+Implementations must subclass the following modules.
+
+=over 4
+
+=item * L<Catalyst::Controller::Atompub::Service>
+
+Presents information of collections in a Service Document.
+
+=item * L<Catalyst::Controller::Atompub::Collection>
+
+Publishes and edits resources in the collection.
+
+=back
+
+At first, install sample C<samples/MyAtom> in L<SAMPLES> and read controller classes.
+The code is explained in
+L<Catalyst::Controller::Atompub::Service> and 
+L<Catalyst::Controller::Atompub::Collection>.
+
+L<Catalyst::Controller::Atompub> was tested in InteropTokyo2007
+L<http://intertwingly.net/wiki/pie/July2007InteropTokyo>, 
+and interoperated with other implementations.
+
+
+=head1 SAMPLES
+
+Sample codes are found in I<samples/> directory.
+The following resources are required:
+
+=over 4
+
+=item * Catalyst v5.7 or later
+
+=item * Catalyst::Model::DBIC::Schema v0.20 or later
+
+=item * Catalyst::View::TT v0.25 or later (C<MyBlog> only)
+
+=item * Catalyst Plugins (C<MyBlog> only)
+
+    Authentication
+    Authentication::Store::DBIC
+    Authentication::Credential::HTTP
+
+=item * SQLite v3.0 or later
+
+Initialize your database with C<init.sql> before running the samples.
+The initialization script assums that database is C<test.db>.
+
+=back
+
+
+=head2 samples/MyAtom
+
+This sample is minimum implementation of the Atom Publishing Protocol.
+It has a single collection containing Entry Resources.
+Cache controll and feed paging are not provided.
+Errors are ignored.
+
+URI of the Service Document is http://localhost:3000/myservice .
+
+This sample is a kind of tutorial.
+
+
+=head2 samples/MyBlog
+
+This sample implements many features of the Atom Publishing Protocol.
+It has two collections; one collection contains Entry Resources, 
+the other contains Media Resources (images).
+The server provides basic authentication, cache controll and feed paging.
+Duplicate detection of resource names is also implemented.
+Errors are properly handled.
+
+URI of the Service Document is http://localhost:3000/service .
+This sample also provides a HTML view at http://localhost:3000/html .
+
+
+=head1 AUTHOR
+
+Takeru INOUE  C<< <takeru.inoue _ gmail.com> >>
+
+I would like to thank Masaki NAKAGAWA for his valuable suggestions.
+
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2007, Takeru INOUE C<< <takeru.inoue _ gmail.com> >>. All rights reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself. See L<perlartistic>.
+
+
+=head1 DISCLAIMER OF WARRANTY
+
+BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
+YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
+LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub/Base.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub/Base.pm (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub/Base.pm (revision 1860)
@@ -0,0 +1,247 @@
+package Catalyst::Controller::Atompub::Base;
+
+use strict;
+use warnings;
+
+use Atompub::DateTime qw( datetime );
+use Atompub::MediaType qw( media_type );
+use Catalyst::Controller::Atompub;
+use HTTP::Status;
+use NEXT;
+
+use base qw( Catalyst::Controller );
+
+__PACKAGE__->mk_accessors( qw( info ) );
+
+sub new {
+    my $class = shift;
+    my $self = $class->NEXT::new(@_);
+    $self->info( Catalyst::Controller::Atompub::Info->instance( $self ) );
+    $self;
+}
+
+sub error {
+    my ( $self, $c, @args ) = @_;
+
+    return if ! is_success $c->res->status && $c->res->body;
+
+    my ( $status, $message )
+	= @args == 1 && $args[0] =~ /^(\d{3})\s*(.*)/ ? ( $1, $2 )
+	: @args  > 1                                  ?  @args
+	:                                               ();
+
+    $status ||= RC_INTERNAL_SERVER_ERROR;
+    $c->res->status( $status );
+
+    $message ||= status_message( $status );
+    my $report = "$status $message";
+
+    my $entry = XML::Atom::Entry->new;
+
+    my $link = XML::Atom::Link->new;
+    $link->rel('related'); # XXX via?
+    $link->href( $c->req->uri );
+    $entry->add_link( $link );
+
+    $entry->updated( datetime->w3c );
+    $entry->title( $report );
+    $entry->content( $report ); # XXX @type=text is better
+
+    $c->res->body( $entry->as_xml );
+    $c->res->content_type( media_type('entry') );
+
+    $c->log->error( $report );
+
+    return;
+}
+
+package Catalyst::Controller::Atompub::Info;
+
+use strict;
+use warnings;
+
+use Catalyst::Utils;
+use XML::Atom::Service;
+use base qw( Class::Accessor::Lvalue::Fast );
+
+__PACKAGE__->mk_accessors( qw( appclass ) );
+
+my $Info;
+
+sub instance {
+    my $class = shift;
+    $Info ||= bless { appclass => Catalyst::Utils::class2appclass( shift ) }, $class;
+    $Info;
+}
+
+sub get { 
+    my ( $self, $c, $class ) = @_;
+    return unless $class = $self->_fullclass( $c, $class );
+    return unless $self->_is_collection( $c, $class );
+    $self->{info}{$class} ||= $self->_make_collection( $c, $class );
+}
+
+sub _fullclass {
+    my ( $self, $c, $class ) = @_;
+    $class = ref $class || $class || return;
+    my $appclass = $self->appclass;
+    return $class =~ /^$appclass\::/ ? $class : join( '::', $appclass, $class  );
+}
+
+sub _is_collection {
+    my ( $self, $c, $class ) = @_;
+    return UNIVERSAL::isa $class, 'Catalyst::Controller::Atompub::Collection';
+}
+
+sub _make_collection {
+    my ( $self, $c, $class ) = @_;
+
+    my $suffix = Catalyst::Utils::class2classsuffix( $class );
+
+    my $config = $c->config->{$suffix}{collection};
+
+    my $coll = XML::Atom::Collection->new;
+    $coll->href( $self->_make_href( $c, $class ) );
+    $coll->title( $config->{title} || $class =~ /Controller::(.+)/ );
+    $coll->accept( @{ $config->{accept} } ) if $config->{accept};
+
+    $coll->add_categories( $self->_make_categories( $c, $_ ) )
+	for @{ $config->{categories} };
+
+    return $coll;
+}
+
+sub _make_href {
+    my ( $self, $c, $class ) = @_;
+    return unless $class = $self->_fullclass( $c, $class );
+    return $c->req->base . $class->action_namespace( $c );
+}
+
+sub _make_categories {
+    my ( $self, $c, $config ) = @_;
+
+    my $cats = XML::Atom::Categories->new;
+    $cats->href( $config->{href} ) if $config->{href};
+    $cats->fixed( $config->{fixed} ) if $config->{fixed};
+    $cats->scheme( $config->{scheme} ) if $config->{scheme};
+
+    my @cat = map { my $cat = XML::Atom::Category->new;
+		    $cat->term( $_->{term} );
+		    $cat->scheme( $_->{scheme} ) if $_->{scheme};
+		    $cat->label( $_->{label} ) if $_->{label};
+		    $cat }
+                 @{ $config->{category} };
+    $cats->category( @cat );
+
+    return $cats;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Catalyst::Controller::Atompub::Base
+- A Catalyst controller for the Publishing Protocol
+
+
+=head1 DESCRIPTION
+
+L<Catalyst::Controller::Atompub::Base> is a base class of
+L<Catalyst::Controller::Atompub::Service> and
+L<Catalyst::Controller::Atompub::Collection>.
+
+
+=head1 METHODS
+
+=head2 $controller->new
+
+
+=head2 $controller->info
+
+An accessor for Collection information object.
+
+
+=head2 $controller->error( $c, [ $status, $message ] )
+
+Sets an Entry Document containing error message in $c->response->body,
+and returns C<undef>.
+
+See L<ERROR HANDLING>.
+
+
+=head1 ERROR HANDLING
+
+When something wrong happens, return with calling $controller->error method like:
+
+    sub foo {
+        my ( $controller ,$c ) = @_;
+
+        return $controller->error( $c, 404, "Entry does not exist" )
+            if is_something_wrong;
+    }
+
+Then, Atompub server responds with an Entry Document including error message:
+
+    HTTP/1.1 404 Not Found
+    Content-Type: application/atom+xml;type=entry
+
+    <?xml version="1.0" encoding="UTF-8"?>
+    <entry xmlns="http://www.w3.org/2005/Atom">
+     <updated>2007-01-01T00:00:00Z</updated>
+     <link rel="related" 
+           href="http://localhost:3000/mycollection/entry_1.atom"/>
+     <title>404 Entry does not exist</title>
+     <content type="xhtml">
+      <div xmlns="http://www.w3.org/1999/xhtml">
+       404 Entry does not exist
+      </div>
+     </content>
+    </entry>
+
+This default behavior can be changed by overriding the C<error> method.
+
+
+=head1 SEE ALSO
+
+L<XML::Atom>
+L<XML::Atom::Service>
+L<Atompub>
+L<Catalyst::Controller::Atompub>
+
+
+=head1 AUTHOR
+
+Takeru INOUE  C<< <takeru.inoue _ gmail.com> >>
+
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2007, Takeru INOUE C<< <takeru.inoue _ gmail.com> >>. All rights reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself. See L<perlartistic>.
+
+
+=head1 DISCLAIMER OF WARRANTY
+
+BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
+YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
+LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub/Collection.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub/Collection.pm (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub/Collection.pm (revision 2901)
@@ -0,0 +1,1174 @@
+package Catalyst::Controller::Atompub::Collection;
+
+use strict;
+use warnings;
+
+use Atompub::DateTime qw( datetime );
+use Atompub::MediaType qw( media_type );
+use Atompub::Util qw( is_acceptable_media_type is_allowed_category );
+use Catalyst::Utils;
+use File::Slurp;
+use HTTP::Status;
+use NEXT;
+use POSIX qw( strftime );
+use Text::CSV;
+use Time::HiRes qw( gettimeofday );
+use URI::Escape;
+use XML::Atom::Entry;
+
+use base qw( Catalyst::Controller::Atompub::Base );
+
+__PACKAGE__->mk_accessors( qw( edited ) );
+
+my %COLLECTION_METHOD = ( GET    => '_list',
+			  HEAD   => '_list',
+			  POST   => '_create' );
+my %RESOURCE_METHOD   = ( GET    => '_read',
+			  HEAD   => '_read',
+			  POST   => '_create',
+			  PUT    => '_update',
+			  DELETE => '_delete' );
+
+sub auto :Private {
+    my ( $self, $c ) = @_;
+    $self->{resources} = [];
+    1;
+}
+
+# access to the collection
+sub default :Private {
+    my ( $self, $c ) = @_;
+    my $method = $COLLECTION_METHOD{ uc $c->req->method };
+    if ( ! $method ) {
+	$c->res->headers->allow('GET, HEAD, POST');
+        return $self->error( $c, RC_METHOD_NOT_ALLOWED );
+    }
+    $self->$method( $c );
+}
+
+sub edit_uri :LocalRegex('^([^-/][^/]*)') {
+    my ( $self, $c ) = @_;
+    my $method = $RESOURCE_METHOD{ uc $c->req->method };
+    if ( ! $method ) {
+	$c->res->headers->allow('GET, HEAD, PUT, DELETE');
+        return $self->error( $c, RC_METHOD_NOT_ALLOWED );
+    }
+    $self->$method( $c );
+}
+
+sub resource {
+    my $self = shift;
+    if ( @_ ) {
+	my $rc = shift;
+	push @{ $self->{resources} }, $rc;
+    }
+    else {
+	my ( $rc ) = grep { $_ } @{ $self->{resources} };
+	return $rc;
+    }
+}
+
+*rc = \&resource;
+
+my @ACCESSORS = ( [ 'collection_resource', 'feed',  'is_collection' ],
+		  [ 'entry_resource',      'entry', 'is_entry'      ],
+		  [ 'media_resource',       undef,  'is_media'      ],
+		  [ 'media_link_entry',    'entry', 'is_entry'      ] );
+
+for my $accessor ( @ACCESSORS ) {
+    no strict 'refs'; ## no critic
+    my ( $method, $type, $is ) = @$accessor;
+    *{$method} = sub {
+	my $self = shift;
+	if ( @_ ) {
+	    my $rc = $_[0];
+	    $rc->type( media_type( $type ) ) if $type;
+	    push @{ $self->{resources} }, $rc;
+	}
+	else {
+	    my ( $rc ) = grep { ! $_->type || $_->$is }
+	                 grep { $_ }
+	                     @{ $self->{resources} };
+	    return $rc;
+	}
+    };
+}
+
+sub make_edit_uri {
+    my ( $self, $c, @args ) = @_;
+
+    my $collection_uri = $self->info->get( $c, $self )->href;
+
+    my $basename;
+    if ( my $slug = $c->req->slug ) {
+	my $slug = uri_unescape $slug;
+	$slug =~ s/^\s+//; $slug =~ s/\s+$//; $slug =~ s/[.\s]+/_/;
+	$basename = uri_escape lc $slug;
+    }
+    else {
+	my ( $sec, $usec ) = gettimeofday;
+	$basename
+	    = join '-', strftime( '%Y%m%d-%H%M%S', localtime($sec) ), sprintf( '%06d', $usec );
+    }
+
+    my @media_types = map { media_type($_) } ( 'entry', @args );
+
+    my @uris;
+    for my $media_type ( @media_types ) {
+	my $ext  = $media_type->extension || 'bin';
+	my $name = join '.', $basename, $ext;
+	push @uris, join '/', $collection_uri, $name;
+    }
+
+    return wantarray ? @uris : $uris[0];
+}
+
+for my $operation qw( list create read update delete ) {
+    no strict 'refs'; ## no critic
+    *{ "do_$operation" } = sub {
+	my ( $self, $c, @args ) = @_;
+	return $self->error( $c, RC_METHOD_NOT_ALLOWED )
+	    unless UNIVERSAL::isa( $self->{handler}{ $operation }, 'CODE' );
+	$self->{handler}{ $operation }( $self, $c, @args );
+    };
+}
+
+sub _list {
+    my ( $self, $c ) = @_;
+
+    my $feed = XML::Atom::Feed->new;
+    my $title = $self->info->get( $c, $self )->title;
+    $feed->title( $title );
+
+    if ( $self->{author} ) {
+        my $author = XML::Atom::Person->new;
+	$self->{author}{$_} and $author->$_( $self->{author}{$_} )
+	    for qw( name email uri );
+        $feed->author( $author );
+    }
+
+    $feed->updated( datetime->w3c );
+
+    my $uri = $self->info->get( $c, $self )->href;
+
+    $feed->id( $uri );
+    $feed->self_link( $uri );
+
+    my $rc = Catalyst::Controller::Atompub::Collection::Resource->new;
+    $rc->uri( $uri );
+    $rc->body( $feed );
+    $self->collection_resource( $rc );
+
+    $self->do_list( $c )
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR, "Cannot list collection: $uri" );
+
+    if ( ! $c->res->content_type ) {
+	return $self->error( $c, RC_INTERNAL_SERVER_ERROR, 'Content-Type not assigned' )
+	    if ! $self->collection_resource || ! $self->collection_resource->type;
+	$c->res->content_type( $self->collection_resource->type );
+    }
+
+    return if length $c->res->body;
+
+    return $self->error( $c, RC_INTERNAL_SERVER_ERROR, 'Content body not found' )
+	if ! $self->collection_resource || ! $self->collection_resource->body;
+
+    $c->res->body( $self->collection_resource->serialize );
+}
+
+sub _create {
+    my ( $self, $c ) = @_;
+
+    my $media_type
+	= media_type( $c->req->content_type ) || media_type('application/octet-stream');
+
+    my $coll = $self->info->get( $c, $self );
+
+    return $self->error( $c, RC_UNSUPPORTED_MEDIA_TYPE, "Unsupported media type: $media_type" )
+	unless is_acceptable_media_type( $coll, $media_type );
+
+    $self->edited( datetime );
+
+    if ( $media_type->is_a('entry') ) {
+	my ( $uri ) = $self->make_edit_uri( $c );
+
+	my $entry = XML::Atom::Entry->new( $c->req->body )
+	    || return $self->error( $c, RC_BAD_REQUEST, XML::Atom::Entry->errstr );
+
+	return $self->error( $c, RC_BAD_REQUEST, 'Forbidden category' )
+	    unless is_allowed_category( $coll, $entry->category );
+
+	$entry->edited( $self->edited->w3c );
+	$entry->updated( $self->edited->w3c ) unless $entry->updated;
+
+	$entry->id( $uri );
+
+	$entry->edit_link( $uri );
+
+	my $rc = Catalyst::Controller::Atompub::Collection::Resource->new;
+	$rc->edited( $self->edited ); # XXX DEPRECATED
+	$rc->uri( $uri );
+	$rc->body( $entry );
+	$self->entry_resource( $rc );
+    }
+    else {
+	my ( $entry_uri, $media_uri ) = $self->make_edit_uri( $c, $media_type );
+
+	my $media
+	    = read_file( $c->req->body, binmode => ':raw', err_mode => 'carp' )
+	        || return $self->error( $c, RC_BAD_REQUEST, 'No media resource' );
+
+	my $entry = XML::Atom::Entry->new;
+
+	$entry->edited( $self->edited->w3c );
+	$entry->updated( $self->edited->w3c ) unless $entry->updated;
+
+	my $link = XML::Atom::Link->new;
+	$link->rel('edit-media');
+	$link->href( $media_uri );
+	$entry->add_link( $link );
+
+	$entry->title( uri_unescape $c->req->slug || 'No Title' );
+
+	my $content = XML::Atom::Content->new;
+	$content->src( $media_uri );
+	$content->type( $c->req->content_type );
+	$entry->content( $content );
+
+	my $rc = Catalyst::Controller::Atompub::Collection::Resource->new;
+	$rc->edited( $self->edited ); # XXX DEPRECATED
+	$rc->uri( $media_uri );
+	$rc->body( $media );
+	$rc->type( $media_type );
+	$self->media_resource( $rc );
+
+	$entry->id( $entry_uri );
+
+	$link = XML::Atom::Link->new;
+	$link->rel('edit');
+	$link->href( $entry_uri );
+	$entry->add_link( $link );
+
+	$rc = Catalyst::Controller::Atompub::Collection::Resource->new;
+	$rc->edited( $self->edited ); # XXX DEPRECATED
+	$rc->uri( $entry_uri );
+	$rc->body( $entry );
+	$self->media_link_entry( $rc );
+    }
+
+    $self->do_create( $c )
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR,
+				'Cannot create new resource: ' . $self->info->get( $c, $self )->href  );
+
+    $c->res->status( RC_CREATED );
+
+    if ( ! $c->res->location ) {
+	return $self->error( $c, RC_INTERNAL_SERVER_ERROR, 'Location not found' )
+	    if ! $self->entry_resource || ! $self->entry_resource->uri;
+	$c->res->location( $self->entry_resource->uri );
+    }
+
+    if ( ! defined $c->res->etag || ! $c->res->last_modified ) {
+	my %ret = $self->find_version( $c, $c->res->location );
+	$c->res->etag( $ret{etag} )
+	    if ! defined $c->res->etag && defined $ret{etag};
+	$c->res->last_modified( $ret{last_modified} )
+	    if ! $c->res->last_modified && $ret{last_modified};
+    }
+
+    if ( ! $c->res->content_type ) {
+	return $self->error( $c, RC_INTERNAL_SERVER_ERROR, 'Content-Type not assigned' )
+	    if ! $self->entry_resource || ! $self->entry_resource->type;
+	$c->res->content_type( $self->entry_resource->type );
+    }
+
+    return if length $c->res->body;
+
+    return $self->error( $c, RC_INTERNAL_SERVER_ERROR, 'Content body not found' )
+	if ! $self->entry_resource || ! $self->entry_resource->body;
+
+    $c->res->body( $self->entry_resource->serialize );
+}
+
+sub _read {
+    my ( $self, $c ) = @_;
+
+    return $c->res->status( RC_NOT_MODIFIED ) unless $self->_is_modified( $c );
+
+    my $uri = $c->req->uri;
+
+    my @accepts = $self->info->get( $c, $self )->accepts;
+    my $media_type = @accepts == 0 ? media_type('entry')
+	           : @accepts == 1 ? media_type( $accepts[0] )
+		   :                 undef;
+
+    my $rc = Catalyst::Controller::Atompub::Collection::Resource->new;
+    $rc->uri( $uri );
+    $rc->type( $media_type );
+    $self->rc( $rc );
+
+    $self->do_read( $c )
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR, "Cannot read resource: $uri" );
+
+    if ( ! defined $c->res->etag || ! $c->res->last_modified ) {
+	my %ret = $self->find_version( $c, $uri );
+	$c->res->etag( $ret{etag} )
+	    if ! defined $c->res->etag && defined $ret{etag};
+	$c->res->last_modified( $ret{last_modified} )
+	    if ! $c->res->last_modified && $ret{last_modified};
+    }
+
+    if ( ! $c->res->content_type ) {
+	$self->rc->type( media_type('entry') )
+	    if UNIVERSAL::isa( $self->rc->body, 'XML::Atom::Entry' );
+	return $self->error( $c, RC_INTERNAL_SERVER_ERROR, 'Content-Type not assigned' )
+	    if ! $self->rc || ! $self->rc->type;
+	$c->res->content_type( $self->rc->type );
+    }
+
+    return if length $c->res->body;
+
+    return $self->error( $c, RC_INTERNAL_SERVER_ERROR, 'Content body not found' ) 
+	if ! $self->rc || ! $self->rc->body;
+
+    $c->res->body( $self->rc->serialize );
+}
+
+sub _update {
+    my ( $self, $c ) = @_;
+
+    return $self->error( $c, RC_PRECONDITION_FAILED )
+	if $self->_is_modified( $c );
+
+    my $media_type
+	= media_type( $c->req->content_type ) || media_type('application/octet-stream');
+
+    my $coll = $self->info->get( $c, $self );
+
+    return $self->error( $c, RC_UNSUPPORTED_MEDIA_TYPE, "Unsupported media type: $media_type" )
+	if    ! is_acceptable_media_type( $coll, $media_type )
+	   && ! $media_type->is_a('entry');
+              # XXX Entries are okay, this is because Media Link Entries can be PUT
+              #     even to the Media Resource Collection
+
+    $self->edited( datetime );
+
+    my $uri = $c->req->uri;
+
+    my $content;
+    if ( $media_type->is_a('entry') ) {
+	my $entry = XML::Atom::Entry->new( $c->req->body )
+	    || return $self->error( $c, RC_BAD_REQUEST, XML::Atom::Entry->errstr );
+
+	return $self->error( $c, RC_BAD_REQUEST, 'Forbidden category' )
+	    unless is_allowed_category( $coll, $entry->category );
+
+	$entry->edited( $self->edited->w3c );
+	$entry->updated( $self->edited->w3c ) unless $entry->updated;
+
+	$entry->id( $uri );
+
+	$entry->edit_link( $uri );
+
+	# XXX check edit-media
+
+	$content = $entry;
+
+	$media_type = media_type('entry');
+    }
+    else {
+	$content
+	    = read_file( $c->req->body, binmode => ':raw', err_mode => 'carp' )
+	        || return $self->error( $c, RC_BAD_REQUEST, 'No media' );
+    }
+
+    my $rc = Catalyst::Controller::Atompub::Collection::Resource->new;
+    $rc->edited( $self->edited ); # XXX DEPRECATED
+    $rc->uri( $uri );
+    $rc->body( $content );
+    $rc->type( $media_type );
+    $self->rc( $rc );
+
+    $self->do_update( $c )
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR, "Cannot update resource: $uri" );
+
+    if ( ! defined $c->res->etag || ! $c->res->last_modified ) {
+	my %ret = $self->find_version( $c, $uri );
+	$c->res->etag( $ret{etag} )
+	    if ! defined $c->res->etag && defined $ret{etag};
+	$c->res->last_modified( $ret{last_modified} )
+	    if ! $c->res->last_modified && $ret{last_modified};
+    }
+
+    if ( ! $c->res->content_type ) {
+	return $self->error( $c, RC_INTERNAL_SERVER_ERROR, 'Content-Type not assigned' )
+	    if ! $self->rc || ! $self->rc->type;
+	$c->res->content_type( $self->rc->type );
+    }
+
+    return if length $c->res->body;
+
+    return $self->error( $c, RC_INTERNAL_SERVER_ERROR, 'Content body not found' )
+	if ! $self->rc || ! $self->rc->body;
+
+    $c->res->body( $self->rc->serialize );
+}
+
+sub _delete {
+    my ( $self, $c ) = @_;
+
+# If-Match nor If-Unmodified-Since header is not required on DELETE
+#    return $self->error( $c, RC_PRECONDITION_FAILED )
+#	if $self->_is_modified( $c );
+
+    my $uri = $c->req->uri;
+
+    my $rc = Catalyst::Controller::Atompub::Collection::Resource->new;
+    $rc->uri( $uri );
+    $self->rc( $rc );
+
+    $c->res->status( RC_NO_CONTENT );
+
+    $self->do_delete( $c )
+	|| return $self->error( $c, RC_INTERNAL_SERVER_ERROR, "Cannot delete resource: $uri" );
+}
+
+sub find_version { }
+
+sub _is_modified {
+    my ( $self, $c ) = @_;
+
+    my $method = $c->req->method;
+
+    my %ret = $self->find_version( $c, $c->req->uri );
+
+    my $etag          = $ret{etag};
+    my $last_modified = $ret{last_modified};
+
+    return $method eq 'GET' ? 1 : 0
+	if ! defined $etag && ! $last_modified; # if don't check version
+
+    my $match = $method eq 'GET' ? $c->req->if_none_match : $c->req->if_match;
+    $match =~ s/^['"](.+)['"]$/$1/; #" unquote
+
+    return 1 if defined $etag && ( ! defined $match || $etag ne $match );
+
+    my $since = $method eq 'GET' ? $c->req->if_modified_since : $c->req->if_unmodified_since;
+
+    return 1 if $last_modified && ( ! $since || datetime( $last_modified ) != datetime( $since ) );
+
+    return 0;
+}
+
+sub create_action {
+    my $self = shift;
+    my %args = @_; # namespace, name, reverse, class, attributes, code
+
+    my $attr = lc $args{attributes}{Atompub}[0];
+    my $code =    $args{code};
+
+    my $csv = Text::CSV->new( { allow_whitespace => 1 } );
+    $csv->parse( $attr );
+    for ( $csv->fields ) {
+        $self->{handler}{ $_ } = $code if length $_;
+#        %args = (); # removes 'Loaded Private actions' message in initialization
+    }
+
+    $self->NEXT::create_action( %args );
+}
+
+package Catalyst::Controller::Atompub::Collection::Resource;
+
+use Atompub::MediaType qw( media_type );
+
+use base qw( Class::Accessor::Fast );
+
+__PACKAGE__->mk_accessors( qw( uri type body ) );
+
+sub edited {
+    my $self = shift;
+    if (@_) {
+	$self->{edited} = $_[0];
+    }
+    else {
+	warn '$collection->$resource->edited is DEPRECATED, and see $collection->edited';
+	return $self->{edited};
+    }
+}
+
+sub is_collection {
+    my $self = shift;
+    my $media_type = media_type( $self->type ) || return;
+    return $media_type->is_a('feed');
+}
+
+sub is_entry {
+    my $self = shift;
+    my $media_type = media_type( $self->type ) || return;
+    return $media_type->is_a('entry');
+}
+
+sub is_media {
+    my $self = shift;
+    my $media_type = media_type( $self->type ) || return;
+    return ! $media_type->is_a('application/atom+xml');
+}
+
+sub serialize {
+    my $self = shift;
+    my $body = $self->body;
+    UNIVERSAL::can( $body, 'as_xml' ) ? $body->as_xml : $body;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Catalyst::Controller::Atompub::Collection
+- A Catalyst controller for the Atom Collection Resources
+
+
+=head1 SYNOPSIS
+
+    # Use the Catalyst helper
+    $ perl script/myatom_create.pl controller MyCollection Atompub::Collection
+
+    # And edit lib/MyAtom/Controller/MyCollection.pm
+    package MyAtom::Controller::MyCollection;
+    use base 'Catalyst::Controller::Atompub::Collection';
+
+    # List resources in a Feed Document, which must be implemented in
+    # the mehtod with "Atompub(list)" attribute
+    sub get_feed :Atompub(list) {
+        my ( $self, $c ) = @_;
+    
+        # Skeleton of the Feed (XML::Atom::Feed) was prepared by 
+        # C::C::Atompub
+        my $feed = $self->collection_resource->body;
+    
+        # Retrieve Entries sorted in descending order
+        my $rs = $c->model('DBIC::Entries')
+                   ->search( {}, { order_by => 'edited desc' } );
+    
+        # Add Entries to the Feed
+        while ( my $entry_resource = $rs->next ) {
+            my $entry = XML::Atom::Entry->new( \$entry_resource->xml );
+            $feed->add_entry( $entry );
+        }
+    
+        # Return true on success
+        return 1;
+    }
+    
+    # Create new Entry in the method with "Atompub(create)" attribute
+    sub create_entry :Atompub(create) {
+        my ( $self, $c ) = @_;
+    
+        # URI of the new Entry, which was determined by C::C::Atompub
+        my $uri = $self->entry_resource->uri;
+    
+        # app:edited element, which was assigned by C::C::Atompub,
+        # is coverted into ISO 8601 format like '2007-01-01 00:00:00'
+        my $edited = $self->edited->iso;
+
+        # POSTed Entry (XML::Atom::Entry)
+        my $entry = $self->entry_resource->body;
+    
+        # Create new Entry
+        $c->model('DBIC::Entries')->create( {
+            uri    => $uri,
+            edited => $edited,
+            xml    => $entry->as_xml,
+        } );
+    
+        # Return true on success
+        return 1;
+    }
+    
+    # Search the requested Entry in the method with "Atompub(read)"
+    # attribute
+    sub get_entry :Atompub(read) {
+        my ( $self, $c ) = @_;
+    
+        my $uri = $c->req->uri;
+    
+        # Retrieve the Entry
+        my $rs = $c->model('DBIC::Entries')->find( { uri => $uri } );
+    
+        # Set the Entry
+        my $entry = XML::Atom::Entry->new( \$rs->xml );
+        $self->entry_resource->body( $entry );
+    
+        # Return true on success
+        return 1;
+    }
+    
+    # Update the requested Entry in the method with "Atompub(update)"
+    # attribute
+    sub update_entry :Atompub(update) {
+        my ( $self, $c ) = @_;
+    
+        my $uri = $c->req->uri;
+    
+        # app:edited element, which was assigned by C::C::Atompub,
+        # is coverted into ISO 8601 format like '2007-01-01 00:00:00'
+        my $edited = $self->edited->iso;
+
+        # PUTted Entry (XML::Atom::Entry)
+        my $entry = $self->entry_resource->body;
+    
+        # Update the Entry
+        $c->model('DBIC::Entries')->find( { uri => $uri } )
+                                  ->update( {
+                                      uri => $uri,
+                                      edited => $edited,
+                                      xml => $entry->as_xml,
+                                  } );
+    
+        # Return true on success
+        return 1;
+    }
+    
+    # Delete the requested Entry in the method with "Atompub(delete)"
+    # attribute
+    sub delete_entry :Atompub(delete) {
+        my ( $self, $c ) = @_;
+    
+        my $uri = $c->req->uri;
+    
+        # Delete the Entry
+        $c->model('DBIC::Entries')->find( { uri => $uri } )->delete;
+    
+        # Return true on success
+        return 1;
+    }
+        
+    # Access to http://localhost:3000/mycollection and get Feed Document
+
+
+=head1 DESCRIPTION
+
+Catalyst::Controller::Atompub::Collection provides the following features:
+
+=over 4
+
+=item * Pre-processing requests
+
+L<Catalyst::Controller::Atompub::Collection> pre-processes the HTTP requests.
+All you have to do is just writing CRUD operations in the subroutines 
+with I<Atompub> attribute.
+
+=item * Media Resource support
+
+Media Resources (binary data) as well as Entry Resources are supported.
+A Media Link Entry, which has an I<atom:link> element to the newly created Media Resource, 
+is given by L<Catalyst::Controller::Atompub::Collection>.
+
+=item * Media type check
+
+L<Catalyst::Controller::Atompub::Collection> checks a media type of 
+the POSTed/PUTted resource based on collection configuration.
+
+=item * Category check
+
+L<Catalyst::Controller::Atompub::Collection> checks 
+I<atom:category> elements in the POSTed/PUTted Entry Document
+based on collection configuration.
+
+=item * Cache controll and versioning
+
+Cache controll and versioning are enabled just by overriding C<find_version> method, 
+which returns I<ETag> and/or I<Last-Modified> header.
+
+=item * Naming resources by I<Slug> header
+
+Resource URIs are determined based on I<Slug> header if exists.
+If the I<Slug> header is "Entry 1", the resource URI will be like:
+
+    http://localhost:3000/mycollection/entry_1.atom
+
+The default naming rules can be changed by overriding C<make_edit_uri> method.
+
+=back
+
+
+=head1 SUBCLASSING
+
+One or more subclasses are required in your Atompub server implementation.
+In the subclasses, methods with the following attributes must be defined.
+
+
+=head2 sub xxx :Atompub(list)
+
+Lists resources in a Feed Document.
+
+This method is expected to add Entries and other elements to a skeleton of the Feed.
+The following accessors can be used.
+
+=over 2
+
+=item - $controller->collection_resource->uri
+
+URI of Collection
+
+=item - $controller->collection_resource->body
+
+Skeleton of Feed (L<XML::Atom::Feed>)
+
+=back
+
+Returns true on success, false otherwise.
+
+
+=head2 sub xxx :Atompub(create)
+
+Creates new resource.
+
+=over 4
+
+=item * In Collections with Entry Resources
+
+The implementation is expected to insert the new Entry to your model, such as L<DBIx::Class>.
+The following accessors can be used.
+
+=over 2
+
+=item - $controller->entry_resource->uri
+
+URI of New Entry
+
+=item - $controller->entry_resource->edited
+
+I<app:edited> element of New Entry
+
+=item - $controller->entry_resource->body
+
+New Entry (L<XML::Atom::Entry>)
+
+=back
+
+
+=item * In Collections with Media Resources
+
+The implementation is expected to insert new Media Link Entry as well as new Media Resource 
+to your model, such as L<DBIx::Class>.
+
+The following accessors can be used for the Media Resource.
+
+=over 2
+
+=item - $controller->media_resource->uri
+
+URI of New Media Resource
+
+=item - $controller->media_resource->edited
+
+I<app:edited> element of New Media Resource
+
+=item - $controller->media_resource->type
+
+Media type of New Media Resource
+
+=item - $controller->media_resource->body
+
+New Media Resource (a byte string)
+
+=back
+
+
+The following accessors can be used for Media Link Entry.
+
+=over 2
+
+=item - $controller->media_link_entry->uri
+
+URI of New Media Link Entry
+
+=item - $controller->media_link_entry->edited
+
+I<app:edited> element of New Media Link Entry
+
+=item - $controller->media_link_entry->body
+
+New Media Link Entry (L<XML::Atom::Entry>)
+
+=back
+
+
+=back
+
+Returns true on success, false otherwise.
+
+
+=head2 sub xxx :Atompub(read)
+
+Searchs the requested resource.
+
+=over 4
+
+=item * In Collections with Entry Resources
+
+The implementation is expected to search the Entry,
+which must be stored in C<body> accessor described below.
+The following accessors can be used.
+
+=over 2
+
+=item - $controller->entry_resource->body
+
+Entry (L<XML::Atom::Entry>)
+
+=back
+
+=item * In Collections with Media Resources
+
+The implementation is expected to search Media Resource or Media Link Entry,
+which must be stored in C<body> accessor described below.
+The following accessors can be used for the Media Resource.
+
+=over 2
+
+=item - $controller->media_resource->type
+
+Media type of Media Resource
+
+=item - $controller->media_resource->body
+
+Media Resource (a byte string)
+
+=back
+
+The following accessors can be used for the Media Link Entry.
+
+=over 2
+
+=item - $controller->media_link_entry->body
+
+Media Link Entry (L<XML::Atom::Entry>)
+
+=back
+
+=back
+
+Returns true on success, false otherwise.
+
+
+=head2 sub xxx :Atompub(update)
+
+Updates the requested resource.
+
+
+=over 4
+
+=item * In Collections with Entry Resources
+
+The implementation is expected to update the Entry.
+The following accessors can be used.
+
+=over 2
+
+=item - $controller->entry_resource->uri
+
+URI of Entry
+
+=item - $controller->entry_resource->edited
+
+I<app:edited> element of Entry
+
+=item - $controller->entry_resource->body
+
+Entry (L<XML::Atom::Entry>)
+
+=back
+
+
+=item * In Collections with Media Resources
+
+The implementation is expected to update the Media Resource or the Media Link Entry.
+The following accessors can be used for the Media Resource.
+
+=over 2
+
+=item - $controller->media_resource->uri
+
+URI of Media Resource
+
+=item - $controller->media_resource->edited
+
+I<app:edited> element of Media Resource
+
+=item - $controller->media_resource->type
+
+Media type of Media Resource
+
+=item - $controller->media_resource->body
+
+Media Resource (a byte string)
+
+=back
+
+
+The following accessors can be used for the Media Link Entry.
+
+=over 2
+
+=item - $controller->media_link_entry->uri
+
+URI of Media Link Entry
+
+=item - $controller->media_link_entry->edited
+
+I<app:edited> element of Media Link Entry
+
+=item - $controller->media_link_entry->body
+
+Media Link Entry (L<XML::Atom::Entry>)
+
+=back
+
+=back
+
+Returns true on success, false otherwise.
+
+
+=head2 sub xxx :Atompub(delete)
+
+Deletes the requested resource.
+
+The implementation is expected to delete the resource.
+If the collection contains Media Resources,
+corresponding Media Link Entry must be deleted at once.
+
+Returns true on success, false otherwise.
+
+
+=head1 METHODS
+
+The following methods can be overridden to change the default behaviors.
+
+
+=head2 $controller->find_version( $uri )
+
+By overriding C<find_version> method, cache control and versioning are enabled.
+
+The implementation is expected to return I<ETag> and/or I<Last-Modified> value 
+of the requested URI:
+
+    package MyAtom::Controller::MyCollection;
+
+    sub find_version {
+        my ( $self, $c, $uri ) = @_;
+
+        # Retrieve ETag and/or Last-Modified of $uri
+
+        return ( etag => $etag, last_modified => $last_modified );
+    }
+
+When a resource of the URI does not exist, the implementation must return an empty array.
+
+The behavior of Atompub server will be changed in the following manner:
+
+=over 4
+
+=item * On GET request
+
+Status code of 304 (Not Modified) will be returned, 
+if the requested resource has not been changed.
+
+=item * On PUT request
+
+Status code of 412 (Precondition Failed) will be returned, 
+if the current version of the resource that a client is modifying is not
+the same as the version that the client is basing its modifications on.
+
+=back
+
+
+=head2 $controller->make_edit_uri( $c, [ @args ]);
+
+By default, if the I<Slug> header is "Entry 1", the resource URI will be like:
+
+    http://localhost:3000/mycollection/entry_1.atom
+
+This default behavior can be changed by overriding C<find_version> method:
+
+    package MyAtom::Controller::MyCollection;
+
+    sub make_edit_uri {
+        my ( $self, $c, @args ) = @_;
+
+        my @uris = $self->SUPER::make_edit_uri( $c, @args );
+
+        # Modify @uris as you like
+
+        return @uris;
+    }
+
+Arguments @args are media types of POSTed resources.
+
+This method returns an array of resource URIs;
+the first element is a URI of the Entry Resource (including Media Link Entry), 
+and the second one is a URI of the Media Resource if exists.
+
+
+=head2 $controller->do_list 
+
+=head2 $controller->do_create 
+
+=head2 $controller->do_read 
+
+=head2 $controller->do_update 
+
+=head2 $controller->do_delete
+
+
+=head1 ACCESSORS
+
+=head2 $controller->resource
+
+=head2 $controller->rc
+
+An accessor for a resource object except Media Link Entry.
+
+
+=head2 $controller->collection_resource
+
+An accessor for a Collection Resource object.
+
+
+=head2 $controller->entry_resource
+
+An accessor for an Entry Resource objecgt.
+
+
+=head2 $controller->media_resource
+
+An accessor for a Media Resource object.
+
+
+=head2 $controller->media_link_entry
+
+An accessor for a Media Link Entry object.
+
+
+=head2 $controller->edited
+
+An accessor for a app:edited, which is applied for the POSTed/PUTted Entry Resource.
+
+
+=head1 INTERNAL INTERFACES
+
+=head2 $controller->auto
+
+=head2 $controller->default
+
+=head2 $controller->edit_uri
+
+=head2 $controller->_list 
+
+=head2 $controller->_create 
+
+=head2 $controller->_read 
+
+=head2 $controller->_update 
+
+=head2 $controller->_delete
+
+=head2 $controller->_is_modified
+
+=head2 $controller->create_action
+
+
+=head1 FEED PAGING
+
+This module does not provide paging of Feed Documents.
+Paging mechanism should be implemented in a method with "Atompub(list)" attribute.
+
+
+=head1 CONFIGURATION
+
+By default (no configuration), Collections accept Entry Documents 
+(application/atom+xml) and any I<atom:category> element.
+
+Acceptable I<atom:category> elements can be set like:
+
+    Controller::EntryCollection:
+        collection:
+            title: Diary
+            categories:
+              - fixed: yes
+                scheme: http://example.com/cats/big3
+                category:
+                  - term: animal
+                    label: animal
+                  - term: vegetable
+                    label: vegetable
+                  - term: mineral
+                    scheme: http://example.com/dogs/big3
+                    label: mineral
+
+Acceptable media types is configured like:
+
+    Controller::MediaCollection:
+        collection:
+            title: Photo
+            accept:
+              - image/png
+              - image/jpeg
+              - image/gif
+
+
+=head1 ERROR HANDLING
+
+See ERROR HANDLING in L<Catalyst::Controller::Atompub::Base>.
+
+
+=head1 SAMPLES
+
+See SAMPLES in L<Catalyst::Controller::Atompub>.
+
+
+=head1 SEE ALSO
+
+L<XML::Atom>
+L<XML::Atom::Service>
+L<Atompub>
+L<Catalyst::Controller::Atompub>
+
+
+=head1 AUTHOR
+
+Takeru INOUE  C<< <takeru.inoue _ gmail.com> >>
+
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2007, Takeru INOUE C<< <takeru.inoue _ gmail.com> >>. All rights reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself. See L<perlartistic>.
+
+
+=head1 DISCLAIMER OF WARRANTY
+
+BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
+YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
+LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub/Service.pm
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub/Service.pm (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/lib/Catalyst/Controller/Atompub/Service.pm (revision 2901)
@@ -0,0 +1,191 @@
+package Catalyst::Controller::Atompub::Service;
+
+use strict;
+use warnings;
+
+use Atompub::MediaType qw( media_type );
+use XML::Atom::Service;
+
+use base qw( Catalyst::Controller::Atompub::Base );
+
+__PACKAGE__->mk_accessors( qw( service ) );
+
+sub default :Private {
+    my ( $self, $c ) = @_;
+
+    $self->{service} ||= $self->_make_service( $c );
+    $self->{service}   = $self->modify_service( $c, $self->service )
+	|| $self->error( $c );
+
+    $c->res->content_type( media_type('service') )
+	unless $c->res->content_type;
+
+    $c->res->body( $self->service->as_xml ) unless length $c->res->body;
+}
+
+sub modify_service {
+    my ( $self, $c, $serv ) = @_;
+    return $serv;
+}
+
+sub _make_service {
+    my ( $self, $c ) = @_;
+
+    my $serv = XML::Atom::Service->new;
+
+    my $suffix = Catalyst::Utils::class2classsuffix( ref $self );
+
+    my @configs = @{ $c->config->{$suffix}{workspace} || [] };
+    if ( ! @configs ) {
+	my @colls = grep { $self->info->get( $c, $_ ) } keys %{ $c->components };
+	@configs = ( { title      => Catalyst::Utils::class2appclass( $self ),
+		       collection => \@colls } );
+    }
+
+    for my $config ( @configs ) {
+	my $work = XML::Atom::Workspace->new;
+	$work->title( $config->{title} );
+	$work->add_collection($_) for grep { defined $_ }
+	                               map { $self->info->get( $c, $_ ) }
+	                                  @{ $config->{collection} || [] };
+	$serv->add_workspace( $work );
+    }
+
+    return $serv;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Catalyst::Controller::Atompub::Service
+- A Catalyst controller for the Atom Service Document
+
+
+=head1 SYNOPSIS
+
+    # Use the Catalyst helper
+    $ perl script/myatom_create.pl controller MyService Atompub::Service
+
+    # And edit lib/MyAtom/Controller/MyService.pm
+    package MyAtom::Controller::MyService;
+    use base 'Catalyst::Controller::Atompub::Service';
+
+    # Access to http://localhost:3000/myservice and get Service Document
+
+
+=head1 DESCRIPTION
+
+L<Catalyst::Controller::Atompub::Service> generates a Service Document
+based on collection configuration.
+
+
+=head1 SUBCLASSING
+
+Just a single subclass is required in your Atompub server implementation.
+No methods are needed to be overridden.
+
+
+=head1 METHODS
+
+The following methods can be overridden to change the default behaviors.
+
+
+=head2 $controller->modify_service
+
+By overriding C<modify_service>, modifies the default Service Documents:
+
+    sub modify_service {
+        my ( $self, $c, $service ) = @_;
+
+        # Edit $service (XML::Atom::Service) if you'd like to modify the 
+        # Service Document
+
+        return $service;
+    }
+
+
+=head1 ACCESSORS
+
+=head2 $controller->service
+
+An accessor for a Service Document.
+
+
+=head1 INTERNAL INTERFACES
+
+=head2 $controller->default
+
+=head2 $controller->_make_service
+
+
+=head1 CONFIGURATION
+
+By default (no configuration), this module provides a Service Document 
+with a single I<atom:workspace>.
+The order of I<atom:collection>s is not defined.
+
+You can specify the title and the order of I<atom:workspace>s and I<atom:collection>s like:
+
+Controller::Service:
+    workspace:
+      - title: My Blog
+        collection:
+          - Controller::EntryCollection
+          - Controller::MediaCollection
+
+
+=head1 ERROR HANDLING
+
+See ERROR HANDLING in L<Catalyst::Controller::Atompub::Base>.
+
+
+=head1 SAMPLES
+
+See SAMPLES in L<Catalyst::Controller::Atompub>.
+
+
+=head1 SEE ALSO
+
+L<XML::Atom>
+L<XML::Atom::Service>
+L<Atompub>
+L<Catalyst::Controller::Atompub>
+
+
+=head1 AUTHOR
+
+Takeru INOUE  C<< <takeru.inoue _ gmail.com> >>
+
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2007, Takeru INOUE C<< <takeru.inoue _ gmail.com> >>. All rights reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself. See L<perlartistic>.
+
+
+=head1 DISCLAIMER OF WARRANTY
+
+BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
+YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
+LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Makefile.PL
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Makefile.PL (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Makefile.PL (revision 2901)
@@ -0,0 +1,29 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
+use ExtUtils::MakeMaker;
+WriteMakefile
+(
+          'PL_FILES' => {},
+          'INSTALLDIRS' => 'site',
+          'NAME' => 'Catalyst::Controller::Atompub',
+          'EXE_FILES' => [],
+          'VERSION_FROM' => 'lib/Catalyst/Controller/Atompub.pm',
+          'PREREQ_PM' => {
+                           'Catalyst::Helper' => 0,
+                           'URI::Escape' => 0,
+                           'FindBin' => 0,
+                           'Catalyst::Plugin::ConfigLoader' => 0,
+                           'Text::CSV' => 0,
+                           'HTTP::Status' => 0,
+                           'Test::Perl::Critic' => 0,
+                           'POSIX' => 0,
+                           'Test::WWW::Mechanize::Catalyst' => 0,
+                           'File::Slurp' => 0,
+                           'version' => 0,
+                           'Time::HiRes' => 0,
+                           'Test::More' => 0,
+                           'Atompub' => '0.1.6',
+                           'MIME::Base64' => 0,
+                           'Catalyst::Runtime' => '5.7'
+                         }
+        )
+;
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Changes
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Changes (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Changes (revision 2901)
@@ -0,0 +1,135 @@
+2007-12-08  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+        * release 0.3.0:
+	* lib/Catalyst/Helper/Controller/Atompub/Collection.pm
+	  lib/Catalyst/Helper/Controller/Atompub/Service.pm
+	- new helper classes
+	* lib/Catalyst/Controller/Atompub/Collection.pm
+	- parse method attributes by using Text::CSV (multiple
+	  attributes are allowed, like ":Atompub(create, update)")
+	* Build.PL
+	- fix dependency
+
+2007-12-07  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+        * release 0.2.4:
+	* MANIFEST
+	- add samples/*/atom.db
+
+2007-12-07  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+        * release 0.2.3:
+	* samples/
+	- change database to SQLite3 from MySQL
+	- remove unnecessary POD
+
+2007-11-29  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+        * release 0.2.2:
+	* lib/Catalyst/Controller/Atompub/Collection.pm
+	- unquote If-Match/If-None-Match values
+	  thanks Marumoto
+
+2007-11-19  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+        * release 0.2.1:
+	* samples
+	- insert line feeds at package lines to hide package name from
+	  PAUSE.
+	* samples/MyBlog
+	- don't authenticate for HEAD
+
+2007-11-17  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+        * release 0.2.0:
+	* lib/Catalyst/Controller/Atompub/Collection.pm
+	- fix a bug to respond 405 when unknown HTTP method 
+          received
+	- process HEAD requests
+	* samples/MyBlog
+	- add //link[@rel=service]
+	- redirect to /html if a path is not defined
+
+2007-10-02  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+        * release 0.1.8:
+	* Build.PL
+	- specify the version of Catalyst::Plugin::Static::Simple
+
+2007-09-27  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.1.7:
+	* lib/Catalyst/Controller/Atompub/Collection.pm
+	- modify POD slightly
+
+2007-09-27  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.1.6:
+	* lib/Catalyst/Controller/Atompub/Base.pm
+	- modify error handling
+
+2007-09-26  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.1.5:
+	* lib/Catalyst/Controller/Atompub/Service
+	- don't set Content-Type and body if already set
+	* lib/Catalyst/Controller/Atompub/Base
+	- modify error handling
+
+2007-09-18  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.1.4:
+	* samples/MyBlog
+	- add /feed/link[@type=alternate]
+	* Build.PL
+	- fix dependency
+
+2007-09-16  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.1.3:
+	* Makefile.PL
+	- build_class => Module::Build
+
+2007-09-14  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.1.2:
+	* samples/MyBlog
+	- don't update atom:updated in a Media Link Entry when the
+	  corresponding Media Resource is updated
+
+2007-09-14  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.1.1:
+	* lib/Catalyst/Controller/Atompub/Collection.pm
+	- fix POD on cache control
+
+2007-09-14  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.1.0:
+	- thanks Tim for testing
+	* lib/Catalyst/Controller/Atompub/Collection.pm
+	- don't check If-Match on DELETE
+	- move an accessor for edited to the parent module
+	  Catalyst::Controller::Atompub::Collection
+	* samples/MyBlog
+	- update app:edited and atom:updated in a Media Link Entry when
+	  the corresponding Media Resource is updated
+	- change DB schema
+
+2007-09-12  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.0.3:
+	* samples/MyBlog
+	- returns 404 at MyBlog/Controller/Root.pm
+	* lib/Catalyst/Controller/Atompub/Collection.pm
+	- rewrite make_edit_uri in POD
+
+2007-09-11  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.0.2:
+	* samples/MyAtom
+	- rename sample application to MyAtom from MyApp
+
+2007-09-10  Takeru INOUE  <takeru.inoue _ gmail.com>
+
+	* release 0.0.1: created by Module::Starter
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Build.PL
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Build.PL (revision 2901)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Build.PL (revision 2901)
@@ -0,0 +1,46 @@
+use strict;
+use warnings;
+use Module::Build;
+
+my $builder = Module::Build->new(
+    module_name         => 'Catalyst::Controller::Atompub',
+    license             => 'perl',
+    dist_author         => 'Takeru INOUE <takeru.inoue _ gmail.com>',
+    dist_version_from   => 'lib/Catalyst/Controller/Atompub.pm',
+    requires => {
+        'version'    => 0,
+	'Atompub' => '0.1.6',
+	'Catalyst::Helper' => 0,
+	'Catalyst::Plugin::ConfigLoader' => 0,
+	'Catalyst::Runtime' => 5.7,
+        'File::Slurp' => 0,
+	'FindBin' => 0,
+        'HTTP::Status' => 0,
+	'MIME::Base64' => 0,
+	'POSIX' => 0,
+	'Text::CSV' => 0,
+	'Time::HiRes' => 0,
+	'URI::Escape' => 0,
+    },
+    build_requires => {
+        'Test::More' => 0,
+        'Test::Perl::Critic' => 0,
+	'Test::WWW::Mechanize::Catalyst' => 0,
+    },
+    recommends => {
+	'Catalyst::Action::RenderView' => 0,
+	'Catalyst::Devel' => 0,
+        'Catalyst::Model::DBIC::Schema' => 0,
+	'Catalyst::Plugin::Authentication::Credential::HTTP' => 0,
+	'Catalyst::Plugin::Authentication::Store::DBIC' => 0,
+	'Catalyst::Plugin::Static::Simple' => 0.16,
+	'Catalyst::View::TT' => 0,
+	'DBD::SQLite' => 1.13,
+	'DBIx::Class::Schema::Loader' => 0,
+	'String::CamelCase' => 0,
+    }, 
+    create_makefile_pl => 'traditional',
+    add_to_cleanup      => [ 'Catalyst-Controller-Atompub-*' ],
+);
+
+$builder->create_build_script();
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/MANIFEST.SKIP
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/MANIFEST.SKIP (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/MANIFEST.SKIP (revision 1860)
@@ -0,0 +1,14 @@
+\bRCS\b
+\bCVS\b
+^MANIFEST\.
+^Makefile$
+^Build$
+^Build.bat$
+^_build/
+\.(bak|tdy|old|tmp)$
+~$
+^blid/
+^pm_to_blib
+\.cvsignore
+\.svn/
+\.gz$
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/.cvsignore
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/.cvsignore (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/.cvsignore (revision 1860)
@@ -0,0 +1,10 @@
+blib*
+Makefile
+Makefile.old
+Build
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+Catalyst-Controller-Atompub-*
+cover_db
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Makefile
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Makefile (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/Makefile (revision 1860)
@@ -0,0 +1,79 @@
+#     PREREQ_PM => { FindBin=>q[0], URI::Escape=>q[0], version=>q[0], Time::HiRes=>q[0], XML::Atom=>q[0.25], HTTP::Status=>q[0], Test::Perl::Critic=>q[0], Test::More=>q[0], Atompub=>q[0.1.2], MIME::Base64=>q[0], POSIX=>q[0], Catalyst::Runtime=>q[5.7], Test::WWW::Mechanize::Catalyst=>q[0], XML::Atom::Service=>q[0.15.0], File::Slurp=>q[0] }
+
+all : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1
+realclean : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 realclean
+	/usr/bin/perl -e unlink -e shift Makefile
+
+force_do_it :
+	@ true
+build : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 build
+clean : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 clean
+code : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 code
+config_data : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 config_data
+diff : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 diff
+dist : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 dist
+distcheck : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 distcheck
+distclean : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 distclean
+distdir : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 distdir
+distmeta : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 distmeta
+distsign : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 distsign
+disttest : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 disttest
+docs : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 docs
+fakeinstall : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 fakeinstall
+help : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 help
+html : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 html
+install : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 install
+manifest : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 manifest
+manpages : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 manpages
+pardist : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 pardist
+ppd : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 ppd
+ppmdist : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 ppmdist
+prereq_report : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 prereq_report
+pure_install : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 pure_install
+retest : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 retest
+skipcheck : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 skipcheck
+test : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 test
+testall : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 testall
+testcover : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 testcover
+testdb : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 testdb
+testpod : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 testpod
+testpodcoverage : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 testpodcoverage
+versioninstall : force_do_it
+	/usr/bin/perl Build --makefile_env_macros 1 versioninstall
+
+.EXPORT : INC PREFIX DESTDIR VERBINST INSTALLDIRS TEST_VERBOSE LIB UNINST INSTALL_BASE POLLUTE
+
Index: lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/README
===================================================================
--- lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/README (revision 1860)
+++ lang/perl/Catalyst-Controller-Atompub/tags/0.3.0/README (revision 1860)
@@ -0,0 +1,47 @@
+Catalyst-Controller-Atompub version 0.0.1
+
+[ REPLACE THIS...
+
+  The README is used to introduce the module and provide instructions on
+  how to install the module, any machine dependencies it may have (for
+  example C compilers and installed libraries) and any other information
+  that should be understood before the module is installed.
+
+  A README file is required for CPAN modules since CPAN extracts the
+  README file from a module distribution so that people browsing the
+  archive can use it get an idea of the modules uses. It is usually a
+  good idea to provide version information here so that people can
+  decide whether fixes for the module are worth downloading.
+]
+
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+    perl Makefile.PL
+    make
+    make test
+    make install
+
+
+Alternatively, to install with Module::Build, you can use the following commands:
+
+    perl Build.PL
+    ./Build
+    ./Build test
+    ./Build install
+
+
+
+DEPENDENCIES
+
+None.
+
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2007, Takeru INOUE
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
