[Catalyst-commits] r12376 - in trunk/examples/CatalystAdvent: . lib lib/CatalystAdvent/Controller

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Tue Dec 15 00:56:43 GMT 2009


Author: t0m
Date: 2009-12-15 00:56:43 +0000 (Tue, 15 Dec 2009)
New Revision: 12376

Added:
   trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Root.pm
Modified:
   trunk/examples/CatalystAdvent/Makefile.PL
   trunk/examples/CatalystAdvent/lib/CatalystAdvent.pm
Log:
Remove the deprecated DefaultEnd plugin from the advent code. Move app actions out into root controller as these are also now deprecated

Modified: trunk/examples/CatalystAdvent/Makefile.PL
===================================================================
--- trunk/examples/CatalystAdvent/Makefile.PL	2009-12-15 00:55:05 UTC (rev 12375)
+++ trunk/examples/CatalystAdvent/Makefile.PL	2009-12-15 00:56:43 UTC (rev 12376)
@@ -8,17 +8,18 @@
 
 include('ExtUtils::AutoInstall');
 
-requires( Catalyst => '5.60' );
-requires( 'Catalyst::Plugin::DefaultEnd' );
-requires( 'Catalyst::Plugin::Unicode' );
-requires( 'Catalyst::Plugin::Cache' => '0.08' );
-requires( 'DateTime' );
-requires( 'File::stat' );
-requires( 'Pod::Xhtml' );
-requires( 'Calendar::Simple' );
-requires( 'XML::Atom::SimpleFeed' );
-requires( 'HTTP::Date' );
-requires( 'List::Util' );
+requires Catalyst => '5.80';
+requires 'Catalyst::Plugin::DefaultEnd';
+requires 'Catalyst::Plugin::Unicode';
+requires 'Catalyst::Plugin::Cache' => '0.08';
+requires 'Catalyst::Plugin::Static::Simple';
+requires 'DateTime';
+requires 'File::stat';
+requires 'Pod::Xhtml';
+requires 'Calendar::Simple';
+requires 'XML::Atom::SimpleFeed';
+requires 'HTTP::Date';
+requires 'List::Util';
 
 catalyst_files();
 

Added: trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Root.pm
===================================================================
--- trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Root.pm	                        (rev 0)
+++ trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Root.pm	2009-12-15 00:56:43 UTC (rev 12376)
@@ -0,0 +1,34 @@
+package CatalystAdvent::Controller::Root;
+use strict;
+use warnings;
+
+use base 'Catalyst::Controller';
+__PACKAGE__->config(namespace => '');
+
+=head2 default
+
+Detaches you to the calendar index if no other path is a match.
+
+=cut
+
+sub default : Private {
+    my( $self, $c ) = @_;
+    $c->detach( '/calendar/index' );
+}
+
+=head2 begin
+
+Simply adds the current date to the stash for some operations needed
+across various methods.
+
+=cut
+
+sub begin : Private {
+    my( $self, $c )  = @_;
+    $c->stash->{now} = DateTime->now();
+}
+
+sub end : ActionClass('RenderView') {}
+
+1;
+

Modified: trunk/examples/CatalystAdvent/lib/CatalystAdvent.pm
===================================================================
--- trunk/examples/CatalystAdvent/lib/CatalystAdvent.pm	2009-12-15 00:55:05 UTC (rev 12375)
+++ trunk/examples/CatalystAdvent/lib/CatalystAdvent.pm	2009-12-15 00:56:43 UTC (rev 12376)
@@ -5,7 +5,6 @@
 
 use Catalyst qw( Static::Simple
                  Cache
-                 DefaultEnd 
                  Unicode
               );
 
@@ -33,36 +32,6 @@
 After some sudden inspiration, Catalysters decided to put
 together a Catalyst advent calendar to complement the excellent perl one.
 
-=head1 METHODS
-
-You know the methods should be moved to Controller::Root for
-modernisation purposes, but seeing as we've maintained backwards
-compatibility, and auth is via svn, we don't actually need to in this
-case.
-
-=head2 default
-
-Detaches you to the calendar index if no other path is a match.
-
-=cut
-
-sub default : Private {
-    my( $self, $c ) = @_;
-    $c->detach( '/calendar/index' );
-}
-
-=head2 begin
-
-Simply adds the current date to the stash for some operations needed
-across various methods.
-
-=cut
-
-sub begin : Private {
-    my( $self, $c )  = @_;
-    $c->stash->{now} = DateTime->now();
-}
-
 =head1 AUTHORS
 
 Brian Cassidy, <bricas at cpan.org>




More information about the Catalyst-commits mailing list