You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Wim Kerkhoff <wi...@merilus.com> on 2001/11/23 08:04:24 UTC

EmbperlObject in 2.0b4

Has anyone else gone through the process of upgrading an EmbperlObject
site from 1.3.x to the new 2.0b4?

More details can be provided, but I thought I'd check and see first...
I'm getting strange random outputs and errors. I'll reload a page 4 or 5
times and it'll come up fine... then the next time I get a server error
about:

[8762]ERR: 24: Error in Perl code: Undefined subroutine called at
/usr/local/lib/perl/5.6.1/HTML/Embperl.pm line 745.

This with the latest apache/mod_perl/mod_ssl. The site works fine when I
downgrade back to 1.3.x...

Comments? Is this a installation/configuration/code problem on my dev
server?

My httpd.conf:

PerlSetEnv EMBPERL_ESCMODE 0
PerlSetEnv EMBPERL_OPTIONS 16
PerlSetEnv EMBPERL_OBJECT_BASE base.epl
PerlSetEnv EMBPERL_OBJECT_FALLBACK notfound.epl
PerlSetEnv EMBPERL_SYNTAX "Embperl"
PerlSetEnv EMBPERL_DEBUG 0

<Directory "/var/path/to/dir">
    SetHandler  perl-script
    Options     ExecCGI
    <FilesMatch ".*\.(epl)$">
        PerlHandler HTML::EmbperlObject
    </FilesMatch>
</Directory>

and the base.epl:

[- Execute ('constants.inc') -]
[- Execute ('init.inc') -]
[- Execute ('header.inc') -]
[- Execute ('sidebar.inc') -]
[- Execute ('*') -]
[- Execute ('sidebar_close.inc') -]
[- Execute ('footer.inc') -]
[- Execute ('cleanup.inc') -]

Comments? I'll continue to experiment on it tomorrow with a fresh mind.

-- 

Regards,

Wim Kerkhoff, Software Engineer
Merilus, Inc.  -|- http://www.merilus.com
Email: wim@merilus.com

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: EmbperlObject in 2.0b4

Posted by Gerald Richter <ri...@ecos.de>.
> > Looks like you have Apache::SessionX installed, but not configured
properbly?
>
> Doh! Yup, that's what it is. Just me being brain dead at midnight :-(
> Maybe its possible to put something in the error log if the session
> isn't accessible?
>

I have tried to improve session handling and error reporting, but there is
still something left to do ...

> Disovered something else as well. Another of my developers had a line of
> code like this:
>
>  [$ foreach $h @$head $]
>
> Embperl2 barfs on it... had to change it to
>
>  [$ foreach $h (@$head) $]
>

Yes, README.v2 contains a section called "The following difference to
Embperl 1.x apply:", you will find this and other necessary modifications
there.

> Also, I have several objects that contain pieces of the layout (e.g.
> sidebar.inc, sidebar_close.inc, etc). In sidebar.inc a <table> is opened
> and the nav is put in a left table cell, leaving a <td> open for the
> content which comes from Execute(*). Unless I put [$ syntax
> EmbperlBlocks $] at the top of sidebar.inc, it automatically closes the
> open table by adding </tr></table>. NOT what I want... Is there an
> option for this?
>

[$ syntax EmbperlBlocks $] is the only option for that right now, also I
plan to make table handling a little smarter, because you are not the only
one for whom this is an issue. The problem when that all tags that Embperl
parses, must be properly closed inside one file. If Embperl doesn't parse
it, Embperl doesn't care. With [$ syntax EmbperlBlocks $] you simply turn
off parseing off all HTML tags, while with $optDisableTableScan you where
able to turn off only parsing of table tags in 1.3.x. The result stays the
same. Due to the totaly different architecture of 2.0, it will not be
possible to support $optDisableTableScan without any modifications of your
source in 2.0. Maybe in the future something like [$option DisableTableScan
off $] could work. I have to think about it.

> Still getting some other strange things as well that are scaring me...
> forever loops...

That isn't nice...

> When I change EMBPERL_DEBUG to what you said,
> /tmp/embperl.log ballooned pretty quickly.

Yes, that's what I exptected.

> What I'm going to try later
> is make some smaller test cases of what works and doesn't, and send
> separate log files for each.

That would of course even better.

> I'll try setting up Embperl2 on another
> server in a "clean" environment as well.
>
> In theory, are all Embperl 1.3.x scripts supposed to run under 2.0 with
> little modifications, other then removing the old tags (optRawInput,
> optDisableTableScan, etc)?

Yes, it should run after the modfication mentioned in README.v2

>  It appears that the written parser is either
> a little more picky or a little less picky in some areas.
>

Yes, it works totaly different, by that giving totaly new possibilities, but
some of the thing that were possible in 1.3.x can not work anymore.

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: EmbperlObject in 2.0b4

Posted by Wim Kerkhoff <wi...@merilus.com>.
Gerald Richter wrote:
> 
> >
> > Ok, I have received Embperl-2.0b5_dev-1 from you. With it, I still get
> > the error above. Here is some more detailed information, if it helps:
> >
> 
> These info doesn't look very nice, also I can't reproduce any of there here.
> 
> I have just uploaded 2.0b5, please try this, also I don't expect any changes
> for your problems.

It seems a little better but still doesn't work perfectly with the more
intensive EmbperlObject scripts we have.

> > 7/ When Apache starts up, I get this message in the error log:
> >
> > [20042]SES:  Embperl Session management enabled ()
> >
> > Yet, whenever %udat or %mdat is accessed (e.g. from base.epl) the
> > request stops. Ie, no more output, but no errors/warnings either... kind
> > of strange... I don't have any sessioning configured in httpd.conf or
> > startup.pl.
> >
> 
> Looks like you have Apache::SessionX installed, but not configured properbly?

Doh! Yup, that's what it is. Just me being brain dead at midnight :-( 
Maybe its possible to put something in the error log if the session
isn't accessible?

Disovered something else as well. Another of my developers had a line of
code like this:

 [$ foreach $h @$head $]

Embperl2 barfs on it... had to change it to

 [$ foreach $h (@$head) $]

Also, I have several objects that contain pieces of the layout (e.g.
sidebar.inc, sidebar_close.inc, etc). In sidebar.inc a <table> is opened
and the nav is put in a left table cell, leaving a <td> open for the
content which comes from Execute(*). Unless I put [$ syntax
EmbperlBlocks $] at the top of sidebar.inc, it automatically closes the
open table by adding </tr></table>. NOT what I want... Is there an
option for this?

Still getting some other strange things as well that are scaring me...
forever loops... When I change EMBPERL_DEBUG to what you said,
/tmp/embperl.log ballooned pretty quickly. What I'm going to try later
is make some smaller test cases of what works and doesn't, and send
separate log files for each. I'll try setting up Embperl2 on another
server in a "clean" environment as well.

In theory, are all Embperl 1.3.x scripts supposed to run under 2.0 with
little modifications, other then removing the old tags (optRawInput,
optDisableTableScan, etc)?  It appears that the written parser is either
a little more picky or a little less picky in some areas.

-- 

Regards,

Wim Kerkhoff, Software Engineer
Merilus, Inc.  -|- http://www.merilus.com
Email: wim@merilus.com

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: EmbperlObject in 2.0b4

Posted by Gerald Richter <ri...@ecos.de>.
>
> Ok, I have received Embperl-2.0b5_dev-1 from you. With it, I still get
> the error above. Here is some more detailed information, if it helps:
>

These info doesn't look very nice, also I can't reproduce any of there here.

I have just uploaded 2.0b5, please try this, also I don't expect any changes
for your problems.

Please set EMBPERL_DEBUG tp 0x7fffffff and send me the resulting embperl.log
file (privatly).

> 7/ When Apache starts up, I get this message in the error log:
>
> [20042]SES:  Embperl Session management enabled ()
>
> Yet, whenever %udat or %mdat is accessed (e.g. from base.epl) the
> request stops. Ie, no more output, but no errors/warnings either... kind
> of strange... I don't have any sessioning configured in httpd.conf or
> startup.pl.
>

Looks like you have Apache::SessionX installed, but not configured properbly
?


Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: EmbperlObject in 2.0b4

Posted by Wim Kerkhoff <wi...@merilus.com>.
Gerald Richter wrote:
> 
> >
> > [8762]ERR: 24: Error in Perl code: Undefined subroutine called at
> > /usr/local/lib/perl/5.6.1/HTML/Embperl.pm line 745.
> >
> 
> I guess you run into the same problem as Alan yesterday. I have introduced a
> problem with comments inside [! !] blocks, which causes such an error. I
> send you an updated version per private mail (because it's to big for the
> list). Please let me know if it fixes the problem for you.

Ok, I have received Embperl-2.0b5_dev-1 from you. With it, I still get
the error above. Here is some more detailed information, if it helps:

1/ None of my code uses [! !] blocks. I've only been using the standard
[$ $], [- -], and [+ +].


2/ Not using any of the XML compile-time options


3/ This line of code (even when $act is undefined):
 
New action [+ $act +] needs to be implementated.

Evaluates to: 

New action <[+>$act  needs to be implementated.


4/ By removing '$escmode=0' from my *.inc files that were getting
Executed, I managed to get the page to come back up. Also had to remove
a bunch of optRawInput and optDisableTableScan as they are aren't
supported anymore.


5/ make test goes through fine


6/ Using [$ syntax EmbperlBlocks $] instead of optDisableTableScan seems
to work fine. If I don't put it in, I get the strange /tr and /table (no
angle brackets) output at the end of the page.


7/ When Apache starts up, I get this message in the error log: 

[20042]SES:  Embperl Session management enabled ()

Yet, whenever %udat or %mdat is accessed (e.g. from base.epl) the
request stops. Ie, no more output, but no errors/warnings either... kind
of strange... I don't have any sessioning configured in httpd.conf or
startup.pl. 

8/ Adding/removing the "use HTML::Embperl; use HTML::EmbperlObject"
lines from startup.pl doesn't make a difference.


I'm going to back to 1.3.x for now, as we need to do development
tomorrow... if you have more ideas I'll try them in a day or two.

-- 

Regards,

Wim Kerkhoff, Software Engineer
Merilus, Inc.  -|- http://www.merilus.com
Email: wim@merilus.com

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: EmbperlObject in 2.0b4

Posted by Gerald Richter <ri...@ecos.de>.
>
> [8762]ERR: 24: Error in Perl code: Undefined subroutine called at
> /usr/local/lib/perl/5.6.1/HTML/Embperl.pm line 745.
>

I guess you run into the same problem as Alan yesterday. I have introduced a
problem with comments inside [! !] blocks, which causes such an error. I
send you an updated version per private mail (because it's to big for the
list). Please let me know if it fixes the problem for you.

I will soon release this fix to CPAN

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org