[svn:mod_parrot] r630 - mod_parrot/trunk/languages/perl6/lib/ModPerl6

[email protected] Fri, 24 Apr 2009 12:48:41 -0700 (PDT)
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Fri Apr 24 12:48:41 2009
New Revision: 630

Modified:
   mod_parrot/trunk/languages/perl6/lib/ModPerl6/Registry.pm

Log:
change script module name to avoid bug w/ leading underscore


Modified: mod_parrot/trunk/languages/perl6/lib/ModPerl6/Registry.pm
==============================================================================
--- mod_parrot/trunk/languages/perl6/lib/ModPerl6/Registry.pm	(original)
+++ mod_parrot/trunk/languages/perl6/lib/ModPerl6/Registry.pm	Fri Apr 24 12:48:41 2009
@@ -16,7 +16,7 @@
     my $name = $path;
     # sanitize the module name
     $name .= subst(/<-alnum>/, '_', :global);
-    return "ModPerl6::Registry::Script::$name";
+    return "ModPerl6::Registry::script_$name";
 }
 
 # this is temporary until mod_parrot supports output filters
@@ -66,6 +66,10 @@
         my $mod = gen_module_name($script);
         my $code = "module $mod; sub reg__handler \{ $data \}";
         eval $code;
+        if ($!) {
+            $r.log_rerror($script, 0, 0, $!);
+            return $Apache::Const::HTTP_INTERNAL_SERVER_ERROR;
+        }
         %registry{$script} = $mod;
         %registry{$mod} = $script;
     }