[Jifty-commit] r1662 - in jifty/trunk/lib: .

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Jul 24 18:52:21 EDT 2006


Author: audreyt
Date: Mon Jul 24 18:52:21 2006
New Revision: 1662

Modified:
   jifty/trunk/lib/Jifty.pm
   jifty/trunk/lib/Jifty/ClassLoader.pm

Log:
* Jifty::ClassLoader - Make Jifty::Handle a CL'ed module as well,
  so MyApp::Handle can implement scary magick of its own.

Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm	(original)
+++ jifty/trunk/lib/Jifty.pm	Mon Jul 24 18:52:21 2006
@@ -262,7 +262,10 @@
         or __PACKAGE__->config->framework('SkipDatabase')
         or not __PACKAGE__->config->framework('Database') )
     {
-        __PACKAGE__->handle( Jifty::Handle->new() );
+
+        my $handle_class = (Jifty->config->framework('ApplicationClass') . "::Handle");
+        Jifty::Util->require( $handle_class );
+        __PACKAGE__->handle( $handle_class->new );
         __PACKAGE__->handle->connect();
         __PACKAGE__->handle->check_schema_version();
     }

Modified: jifty/trunk/lib/Jifty/ClassLoader.pm
==============================================================================
--- jifty/trunk/lib/Jifty/ClassLoader.pm	(original)
+++ jifty/trunk/lib/Jifty/ClassLoader.pm	Mon Jul 24 18:52:21 2006
@@ -65,6 +65,10 @@
 
 An empty class that descends from L<Jifty::Dispatcher>.
 
+=item I<Application>::Handle
+
+An empty class that descends from L<Jifty::Handle> is created.
+
 =item I<Application>::Bootstrap
 
 An empty class that descends from L<Jifty::Bootstrap>.
@@ -118,7 +122,7 @@
 #                . "use base qw/Jifty::Action/; sub _autogenerated { 1 };\n"
 #                . "1;" );
 #    }
-    elsif ( $module =~ m!^(?:$base)::(Record|Collection|Notification|Dispatcher|Bootstrap|Upgrade)$! ) {
+    elsif ( $module =~ m!^(?:$base)::(Record|Collection|Notification|Dispatcher|Bootstrap|Upgrade|Handle)$! ) {
         return $self->return_class(
                   "use warnings; use strict; package $module;\n"
                 . "use base qw/Jifty::$1/; sub _autogenerated { 1 };\n"


More information about the Jifty-commit mailing list