I've recently been installing 1.3 on a fresh system (Perl 5.6.0, 
Linux 2.2.16) and noticed some problems.

First, embpexec.pl doesn't seem to be installed by default when I run 
'make install'. Previous versions installed it under HTML, so I just 
copied it there.

After doing that, I created a hello.epl:

<html>
<head>
</head>
<body>
<p>[+ "hello" +]
</body>
</html>

And running
        $ /home/mblakele/lib/site_perl/i386-linux/HTML/embpexec.pl hello.epl
produces the output you'd expect:

<html>
<head>
</head>
<body>
<p>hello
</body>
</html>

But when I try to run Embperl in my sandbox (httpd -X) I get nothing 
- not even headers - httpd exits with no message. By adding

PERL5OPT=-d
PERLDB_OPTS='NonStop=1 AutoTrace=0'

I see the following exit message:

Signal SEGV at 
/home/mblakele/lib/site_perl/i386-linux/HTML/Embperl.pm line 1193
         HTML::Embperl::handler('*HTML::Embperl::DOC::_1::dbgCmd', 
'*HTML::Embperl::DOC::_1::dbgAllCmds', 'Apache=SCALAR(0x83728e4)') 
called at /dev/null line 0
         require 0 called at /dev/null line 0

My httpd.conf contains

SetEnv EMBPERL_DEBUG 2797
SetEnv EMBPERL_LOG /tmp/mblakele/embperl.log

<Files *.epl>
         SetHandler  perl-script
         PerlHandler HTML::Embperl
         Options ExecCGI
</Files>

AddType text/html .epl

The embperl log shows

[19178]REQ:  Embperl 1.3.0 starting... Sun Dec 17 19:41:03 2000

[19178]REQ:  No Safe Eval  All Opcode allowed   mode = mod_perl (3)
[19178]REQ:  Package = HTML::Embperl::DOC::_1
[19178]Formdata... length = 0
[19178]Using APACHE for output...
[19178]Reading /home/mblakele/jamlist/html/hello.epl as input using PerlIO ...
[19178]SRC: Line 1: <html>
[19178]SRC: Line 1: <head>
[19178]SRC: Line 2: </head>
[19178]SRC: Line 3: <body>
[19178]CMD:  Cmd = 'body'
[19178]SRC: Line 4: <p>[+ "hello" +]
[19178]SRC: Line 5: [+ "hello" +]

So it looks like I'm getting a SEGV just as Embperl tries to eval that string.

I'm not sure if this is related, but... make test succeeded for 
offline tests, but the mod_perl testing exited with

Syntax error on line 40 of 
/tmp/mblakele/cpan-build/HTML-Embperl-1.3.0/test/conf/httpd.conf:
Can't locate lib.pm in @INC (@INC contains: 
/usr/local/lib/perl5/5.6.0/i586-linux /usr/local/lib/perl5/5.6.0 
/usr/local/lib/perl5/site_perl/5.6.0/i586-linux 
/usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl 
/tmp/mblakele/cpan-build/HTML-Embperl-1.3.0/test/ 
/tmp/mblakele/cpan-build/HTML-Embperl-1.3.0/test/lib/perl) at 
/tmp/mblakele/cpan-build/HTML-Embperl-1.3.0/test/conf/startup.pl line 
2.
BEGIN failed--compilation aborted at 
/tmp/mblakele/cpan-build/HTML-Embperl-1.3.0/test/conf/startup.pl line 
2.
Compilation failed in require at (eval 1) line 1.

That line is
     use lib qw{ . } ;

But I can run that just fine from the command line, with perl -e. I 
suspect an environment problem - perl -V says

   %ENV:
PERL5LIB="/home/mblakele/lib/site_perl:/home/mblakele/lib/site_perl/i386-linux:/home/mblakele/lib/site_perl/i386-linux/auto:/usr/lib/perl5:/usr/lib/perl5/i386-linux:/usr/lib/perl5/site_perl/i386-linux:/usr/lib/perl5/site_perl"
   @INC:
     /home/mblakele/lib/site_perl/i386-linux
     /home/mblakele/lib/site_perl
     /home/mblakele/lib/site_perl/i386-linux
     /home/mblakele/lib/site_perl/i386-linux/auto
     /usr/lib/perl5/i386-linux
     /usr/lib/perl5
     /usr/lib/perl5/i386-linux
     /usr/lib/perl5/site_perl/i386-linux
     /usr/lib/perl5/site_perl/i386-linux
     /usr/lib/perl5/site_perl
     /usr/lib/perl5/i386-linux
     /usr/lib/perl5
     /usr/lib/perl5/site_perl/i386-linux
     /usr/lib/perl5/site_perl
     /usr/lib/perl5/site_perl
     .

So it seems like make test is somehow overwriting my @INC (the 
/home/mblakele stuff is missing in the error message, and so are the 
i386-linux dirs) - or at least ignoring %ENV. But I don't see 
anything like this in test.pl

I also tried the debugger:

$ perl -d test.pl -h
Default die handler restored.

Loading DB routines from perl5db.pl version 1.07
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

loading...                    main::(test.pl:6):        @testdata = (
main::(test.pl:7):          'ascii' => { },
main::(test.pl:8):          'pure.htm' => { },
main::(test.pl:9):          'plain.htm' => {
main::(test.pl:10):             repeat => 3,
   DB<1> p @INC
/home/mblakele/lib/site_perl/i386-linux/home/mblakele/lib/site_perl/home/mblakele/lib/site_perl/i386-linux/home/mblakele/lib/site_perl/i386-linux/auto/usr/lib/perl5/i386-linux/usr/lib/perl5/usr/lib/perl5/i386-linux/usr/lib/perl5/site_perl/i386-linux/usr/lib/perl5/site_perl/i386-linux/usr/lib/perl5/site_perl/usr/lib/perl5/i386-linux/usr/lib/perl5/usr/lib/perl5/site_perl/i386-linux/usr/lib/perl5/site_perl/usr/lib/perl5/site_perl.

...which looks fine. So I'm lost... Any idea why @INC is changing as 
test.pl runs? Or why I can't get mod_perl to execute Embperl?

thanks,
-- Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to