Hi,
I have installed mod_perl and EmbPerl successfully. All the tests work and
I can do simple EmbPerl scripts. However, I'm trying to do a script that
is a little more complicated. The script reads:
<html>
<head>
<title>Some Plain tests for Embperl</title>
</head>
<body>
[-
use foo;
$mvar = foo->new();
-]
[+
$mvar->print_value()
+]
</body>
</html>
foo.pm is very simple. It reads:
package foo;
use strict;
sub new {
my($class) = @_;
return bless {
"VALUE" => "test succeeded"
}, $class;
}
sub print_value {
my($self) = @_;
return $self->{VALUE};
}
1;
When I run the script above, I get the error:
[Wed Apr 19 01:01:57 2000] [error] [554]ERR: 24: Line 8: Error in
Perl code: Can't call method "print_value" without a package or object
reference at /usr/local/apache/htdocs/embperl/test.html line 11.
However, the same thing in a perl script running directly on the machine
works fine. I "use foo", create a new foo object and tell it to
print_value, which it does with no problem.
Any idea what I might be doing wrong?
steve
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]