Basic POD for ::ApplicationAttribute, remove the empty Role directory, switch ::Contr...
Tomas Doran [Tue, 30 Dec 2008 10:01:19 +0000 (10:01 +0000)]
Changes
TODO
lib/Catalyst/Component/ApplicationAttribute.pm
lib/Catalyst/Controller.pm

diff --git a/Changes b/Changes
index ad8e155..e38714d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -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)
diff --git a/TODO b/TODO
index fce0aca..a67d0cb 100644 (file)
--- a/TODO
+++ b/TODO
@@ -10,8 +10,13 @@ Back-compat investigation / known issues:
     - 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 @@ Back-compat investigation / known issues:
   - 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:
index 73dc401..78b292a 100644 (file)
@@ -18,3 +18,56 @@ override BUILDARGS => sub {
 };
 
 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
index 116991a..eef8419 100644 (file)
@@ -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/;