<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,4 +4,9 @@ generating an application skeleton with the &quot;-p&quot; flag (see ./script/newapp.sh -h
 
 Otherwise, you can use the framework in the same directory as your application.
 
+
+Dependency:
+  - The Krai_Mail component of the framework depends on the PEAR Mail library
+  - The Demo Application depends on the PEAR Text_Wiki library
+
 Please see the README file for complete details.</diff>
      <filename>INSTALL</filename>
    </modified>
    <modified>
      <diff>@@ -343,6 +343,12 @@ final class Krai
       self::$MODULES = self::$INCLUDES.&quot;/modules&quot;;
       self::$LAYOUTS = self::$INCLUDES.&quot;/layouts&quot;;
 
+      spl_autoload_register(array(&quot;Krai&quot;,&quot;AutoLoad&quot;));
+      if(function_exists(&quot;__autoload&quot;))
+      {
+        spl_autoload_register(&quot;__autoload&quot;);
+      }
+
       self::$_SETUP = true;
     }
   }
@@ -570,7 +576,7 @@ final class Krai
 
     foreach($args as $filename)
     {
-      if(preg_match(&quot;#^pear://#&quot;), $filename))
+      if(preg_match(&quot;#^pear://#&quot;, $filename))
       {
         try
         {
@@ -674,4 +680,79 @@ final class Krai
     }
 
   }
+
+  /**
+   * Loads the file for a module or action name
+   *
+   * This function attempts to load the file containing the class named by the
+   * parameter. It is configured to have success with modules and actions placed
+   * in the usual places.
+   *
+   * @param string $_class The name of the class
+   * @return boolean The success of the loading
+   * @throws Exception
+   *
+   */
+  public static function AutoLoad($_class)
+  {
+    $_class = self::$INFLECTOR-&gt;Camel2Underscore($_class);
+    if(substr($_class,-6) == &quot;module&quot;)
+    {
+      self::LoadModuleFile(substr($_class, 0, -7));
+    }
+    elseif(substr($_class, -6) == &quot;action&quot;)
+    {
+      list($mod, $act) = explode(&quot;module&quot;, $_class, 2);
+      self::LoadActionFile(substr($mod,0,-1), substr($act, 1,-7));
+    }
+    else
+    {
+      //throw new Exception(&quot;Load failed for class &quot;.$class);
+    }
+  }
+
+  /**
+   * Tries to load the file for a module
+   *
+   * This function attempts to load the file containing a certain module.
+   *
+   * @param string $_module The name of the module
+   * @return boolean The success of the loading
+   * @throws Krai_Router_Exception
+   */
+  private static function LoadModuleFile($_module)
+  {
+    $f = self::$MODULES.&quot;/&quot;.$_module.&quot;.module/&quot;.$_module.&quot;.module.php&quot;;
+    if(self::Uses($f))
+    {
+      return true;
+    }
+    else
+    {
+      //throw new Exception(&quot;Module Load failed for file &quot;.$f);
+    }
+  }
+
+  /**
+   * Tries to load the file for an action
+   *
+   * This function attempts to load the file containing a certain action.
+   *
+   * @param string $_module The name of the module of the action
+   * @param string $_action The name of the action
+   * @return boolean The success of the loading
+   * @throws Exception
+   */
+  private static function LoadActionFile($_module, $_action)
+  {
+    $f = self::$MODULES.&quot;/&quot;.$_module.&quot;.module/actions/&quot;.$_action.&quot;.action.php&quot;;
+    if(self::Uses($f))
+    {
+      return true;
+    }
+    else
+    {
+      //throw new Exception(&quot;Action Load failed for file &quot;.$f);
+    }
+  }
 }</diff>
      <filename>Krai.php</filename>
    </modified>
    <modified>
      <diff>@@ -60,10 +60,6 @@ abstract class Krai_Module extends Krai_Base
     {
       throw new Krai_Module_Exception(&quot;Unable to find requested action &quot;.$action.&quot; (&quot;.$act.&quot; : &quot;.$f.&quot;).&quot;, Krai_Module_Exception::ActionNotFound);
     }
-    else
-    {
-      Krai_Base::$ROUTER-&gt;Load($fsc);
-    }
 
 
     try</diff>
      <filename>Krai/Module.php</filename>
    </modified>
    <modified>
      <diff>@@ -206,7 +206,6 @@ final class Krai_Router
     {
       Krai_Base::$PARAMS = array_merge(Krai_Base::$PARAMS, $_params);
       $t = Krai::$INFLECTOR-&gt;Underscore2Camel($_module.&quot;_module&quot;);
-      $this-&gt;Load($t);
       $inst = new $t();
       $inst-&gt;DoAction($_action, $_SERVER[&quot;REQUEST_METHOD&quot;]);
     }
@@ -241,79 +240,4 @@ final class Krai_Router
     }
   }
 
-  /**
-   * Loads the file for a module or action name
-   *
-   * This function attempts to load the file containing the class named by the
-   * parameter. It is configured to have success with modules and actions placed
-   * in the usual places.
-   *
-   * @param string $_class The name of the class
-   * @return boolean The success of the loading
-   * @throws Krai_Router_Exception
-   *
-   */
-  public function Load($_class)
-  {
-    $_class = Krai::$INFLECTOR-&gt;Camel2Underscore($_class);
-    if(substr($_class,-6) == &quot;module&quot;)
-    {
-      $this-&gt;LoadModuleFile(substr($class, 0, 7));
-    }
-    elseif(substr($_class, -6) == &quot;action&quot;)
-    {
-      list($mod, $act) = explode(&quot;module&quot;, $_class, 2);
-      $this-&gt;LoadActionFile(substr($mod,0,-1), substr($act, 1,-7));
-    }
-    else
-    {
-      throw new Krai_Router_Exception(&quot;Load failed for class &quot;.$class);
-    }
-  }
-
-  /**
-   * Tries to load the file for a module
-   *
-   * This function attempts to load the file containing a certain module.
-   *
-   * @param string $_module The name of the module
-   * @return boolean The success of the loading
-   * @throws Krai_Router_Exception
-   */
-  private function LoadModuleFile($_module)
-  {
-    $f = Krai::$MODULES.&quot;/&quot;.$_module.&quot;.module/&quot;.$_module.&quot;.module.php&quot;;
-    if(Krai::Uses($f))
-    {
-      return true;
-    }
-    else
-    {
-      throw new Krai_Router_Exception(&quot;Module Load failed for file &quot;.$f);
-    }
-  }
-
-  /**
-   * Tries to load the file for an action
-   *
-   * This function attempts to load the file containing a certain action.
-   *
-   * @param string $_module The name of the module of the action
-   * @param string $_action The name of the action
-   * @return boolean The success of the loading
-   * @throws Krai_Router_Exception
-   */
-  private function LoadActionFile($_module, $_action)
-  {
-    $f = Krai::$MODULES.&quot;/&quot;.$_module.&quot;.module/actions/&quot;.$_action.&quot;.action.php&quot;;
-    if(Krai::Uses($f))
-    {
-      return true;
-    }
-    else
-    {
-      throw new Krai_Router_Exception(&quot;Action Load failed for file &quot;.$f);
-    }
-  }
-
 }</diff>
      <filename>Krai/Router.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3a5ca0de4868bdb4d6054cbd4207a884afe1d517</id>
    </parent>
  </parents>
  <author>
    <name>Greg McWhirter</name>
    <email>greg@hallofkvasir.org</email>
  </author>
  <url>http://github.com/gsmcwhirter/krai/commit/f89649803591f77c5cd1b1db116d4eb3850744d3</url>
  <id>f89649803591f77c5cd1b1db116d4eb3850744d3</id>
  <committed-date>2008-07-16T18:09:15-07:00</committed-date>
  <authored-date>2008-07-16T18:09:15-07:00</authored-date>
  <message>Fixing that I actually need autoloading for un-uglyness... using spl_autoload_register</message>
  <tree>754a42e31c7a6bb2d3e801d0656a2583bbf2ac8b</tree>
  <committer>
    <name>Greg McWhirter</name>
    <email>greg@hallofkvasir.org</email>
  </committer>
</commit>
