[Bast-commits] r9256 - Class-C3-Componentised/branches/apply_actions/lib/Class/C3

frew at dev.catalyst.perl.org frew at dev.catalyst.perl.org
Wed Apr 28 02:55:19 GMT 2010


Author: frew
Date: 2010-04-28 03:55:19 +0100 (Wed, 28 Apr 2010)
New Revision: 9256

Modified:
   Class-C3-Componentised/branches/apply_actions/lib/Class/C3/Componentised.pm
Log:
notes

Modified: Class-C3-Componentised/branches/apply_actions/lib/Class/C3/Componentised.pm
===================================================================
--- Class-C3-Componentised/branches/apply_actions/lib/Class/C3/Componentised.pm	2010-04-28 02:52:56 UTC (rev 9255)
+++ Class-C3-Componentised/branches/apply_actions/lib/Class/C3/Componentised.pm	2010-04-28 02:55:19 UTC (rev 9256)
@@ -21,7 +21,7 @@
 
   package main;
 
-  MyModule->load_components( qw/Foo Bar/ ); 
+  MyModule->load_components( qw/Foo Bar/ );
   # Will load MyModule::Component::Foo and MyModule::Component::Bar
 
 =head1 DESCRIPTION
@@ -29,7 +29,7 @@
 This will inject base classes to your module using the L<Class::C3> method
 resolution order.
 
-Please note: these are not plugins that can take precedence over methods 
+Please note: these are not plugins that can take precedence over methods
 declared in MyModule. If you want something like that, consider
 L<MooseX::Object::Pluggable>.
 
@@ -50,7 +50,7 @@
 
 =head2 load_components( @comps )
 
-Loads the given components into the current module. If a module begins with a 
+Loads the given components into the current module. If a module begins with a
 C<+> character, it is taken to be a fully qualified class name, otherwise
 C<< $class->component_base_class >> is prepended to it.
 
@@ -92,7 +92,7 @@
 
 =head2 load_optional_components
 
-As L<load_components>, but will silently ignore any components that cannot be 
+As L<load_components>, but will silently ignore any components that cannot be
 found.
 
 =cut
@@ -218,4 +218,15 @@
 
 =cut
 
+# <@mst> add to Class::C3::Componentised an export, ON_APPLY
+# <@mst> ON_APPLY { ... };
+# <@mst> that stores the coderef and the package name
+# <@mst> load_components then gets changed so it calls that
+# <@mst> then you can do $whatever in there
+# <@mst> you could even have BEFORE_APPLY and AFTER_APPLY
+# <@mst> so you can die() before you get pushed onto @INC if you want
+# >>> ribasushi needs to think a bit how does this help with auto-setting a rset class
+# <@ribasushi> it probably does, I'm slow today
+# <@mst> AFTER_APPLY { my ($me, $applied_to) = @_; $applied_to->resultset_class(...); }
+
 1;




More information about the Bast-commits mailing list