 +        with ($dyn= DynamicClassLoader::instanceFor('modules')); {
 +          $dyn->setClassBytes($class, '?>'.str_replace($m[0], 'class '.$class.' extends Object ', $declaration));
 +          $t= $dyn->loadClass($class);
-+          xp::$registry['modules'][$m[1].'-'.$m[2]]= array($t, $meta);
++          xp::$registry['modules'][$m[1]]= array($t, $meta);
 +        }
 +      }
 +      

===================================================================
--- skeleton/lang/ClassLoader.class.php	(revision 14750)
+++ skeleton/lang/ClassLoader.class.php	(working copy)
@@ -106,6 +106,30 @@
       } else {
         self::$delegates[$l->hashCode()]= $l;
       }

+        foreach (explode(PATH_SEPARATOR, rtrim(scanpath(array($dir), getenv('HOME')), PATH_SEPARATOR)) as $path) {
+          ClassLoader::registerPath($path);
         }
+        $classname= xp::$registry['modules'][strtok($classname, '-')][0]->getAnnotation('main');
       }
+
+      try {
