[Catalyst-commits] r8981 - in Catalyst-Runtime/5.80/trunk: . lib/Catalyst lib/Catalyst/Component

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Tue Dec 30 10:01:19 GMT 2008


Author: t0m
Date: 2008-12-30 10:01:19 +0000 (Tue, 30 Dec 2008)
New Revision: 8981

Removed:
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Component/Role/
Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/TODO
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Component/ApplicationAttribute.pm
   Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm
Log:
Basic POD for ::ApplicationAttribute, remove the empty Role directory, switch ::Controller to extends in a BEGIN block, TODO updates

Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2008-12-29 21:46:45 UTC (rev 8980)
+++ Catalyst-Runtime/5.80/trunk/Changes	2008-12-30 10:01:19 UTC (rev 8981)
@@ -1,5 +1,6 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+        - Use compile time extends in Catalyst::Controller (t0m)
         - Make Catalyst::Request::uploads attribute non-lazy, to fix
           test for Catalyst-Engine-Apache (t0m)
         - Bump version of MooseX::Emulate::Class::Accessor::Fast (t0m)

Modified: Catalyst-Runtime/5.80/trunk/TODO
===================================================================
--- Catalyst-Runtime/5.80/trunk/TODO	2008-12-29 21:46:45 UTC (rev 8980)
+++ Catalyst-Runtime/5.80/trunk/TODO	2008-12-30 10:01:19 UTC (rev 8981)
@@ -10,8 +10,13 @@
     - Generally unhappy with the on_end_of_scope immutable approach,
       try removing new method from plugins (and emitting warning).
 
-  - Engine test failures, look into and update tests / do fixes as
-    needed.
+  - Get engines tested:
+    - Catalyst-Engine-Zeus
+    - Catalyst-Engine-XMPP2
+    - Catalyst-Engine-HTTPEngine
+    - Catalyst-Engine-HTTP-Prefork
+    - Catalyst-Engine-SCGI
+    - Catalyst-Engine-Wx
 
   - CatalystX-Imports, Class::MOP doesn't consider anon subs in the symbol 
     table as methods, tests + fix, or explanation and documentation?
@@ -38,9 +43,8 @@
   - Fix memory leaks (I already tried Devel::Leak::Object, but no joy).
 
   -  In 5.70, you can have a component which doesn't inherit from ::Component, 
-     and has no new method, and it'll do the right thing for you. We just 
-     ignore that, we should still support that, but warn for/deprecate it so 
-     it can go for 5.9X...
+     and has no new method, and it'll do the right thing for you. We should 
+     still support that, but warn for/deprecate it so it can go for 5.9X...
      This all obviously needs better tests :/
 
 Cleanups:

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Component/ApplicationAttribute.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Component/ApplicationAttribute.pm	2008-12-29 21:46:45 UTC (rev 8980)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Component/ApplicationAttribute.pm	2008-12-30 10:01:19 UTC (rev 8981)
@@ -18,3 +18,56 @@
 };
 
 1;
+
+__END__
+
+=head1 NAME
+
+Catalyst::Component::ApplicationAttribute - Moose Role for components which capture the application context.
+
+=head1 SYNOPSIS
+
+    package My::Component;
+    use Moose;
+    extends 'Catalyst::Component';
+    with 'Catalyst::Component::ApplicationAttribute';
+    
+    # Your code here
+    
+    1;
+
+=head1 DESCRIPTION
+
+This role provides a BUILDARGS method which captures the application context into an attribute.
+
+=head1 ATTRIBUTES
+
+=head2 _application
+
+Weak reference to the application context.
+
+=head1 METHODS
+
+=head2 BUILDARGS ($self, $app)
+
+BUILDARGS method captures the application context into the C<_application> attribute.
+
+=head2 _application
+
+Reader method for the application context.
+
+=head1 SEE ALSO
+
+L<Catalyst::Component>,
+L<Catalyst::Controller>.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This program is free software, you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut

Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm	2008-12-29 21:46:45 UTC (rev 8980)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm	2008-12-30 10:01:19 UTC (rev 8981)
@@ -1,8 +1,8 @@
 package Catalyst::Controller;
 
-#switch to BEGIN { extends qw/ ... /; } ?
-use base qw/Catalyst::Component Catalyst::AttrContainer/;
 use Moose;
+# Note - Must be done at compile time due to attributes (::AttrContainer)
+BEGIN { extends qw/Catalyst::Component Catalyst::AttrContainer/; }
 
 use Class::MOP::Object ();
 use Scalar::Util qw/blessed/;




More information about the Catalyst-commits mailing list