Fixed eval of in modules with -

This commit is contained in:
Jamie Cameron
2007-04-17 00:39:56 +00:00
parent e27ca9c9f7
commit 99a3bcd381

View File

@ -232,7 +232,9 @@ while(1) {
print STDERR "fastrpc: eval $arg->{'module'} $arg->{'code'}\n" if ($gconfig{'rpcdebug'});
local $rv;
if ($arg->{'module'}) {
$rv = eval "package $arg->{'module'};\n".
local $pkg = $arg->{'module'};
$pkg =~ s/[^A-Za-z0-9]/_/g;
$rv = eval "package $pkg;\n".
$arg->{'code'}."\n";
}
else {