You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Chris Allen <ch...@cjx.com> on 2002/03/25 16:02:33 UTC

Why no semicolon at the end of lines?

Our main ISP just upgraded their Embperl to 2.0b4 without telling
us - :-( Unfortunately, nearly all our code is in the form:

[+ some_statememt(); +]

so it breaks because of the semicolon. We have thousands of lines of web site
code that don't work now!


Is there an easy workaround (option???) to turn off this problem with
a semicolon at the end of a line? I don't mind if things run slow -
I would just like them all to run!!



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


Re: Why no semicolon at the end of lines?

Posted by Axel Beckert - ecos gmbh <be...@ecos.de>.
Hi!

On Mon, Mar 25, 2002 at 01:40:53PM -0500, Kee Hinckley wrote:
> At 7:19 PM +0100 3/25/02, Axel Beckert - ecos gmbh wrote:
> >If it's 2.0b4 (but not 2.0b6 or later), try to set
> >
> >		    PerlSetEnv EMBPERL_EP1COMPAT 1
> 
> Right, I forgot that one.  It should work.

But only until 2.0b5. So this strange update behaviour has somehow
it's advantages... ;-)

> But still, I'd push the ISP to move to b7, then you both get what
> you want.

I agree completely.

            Regards, Axel Beckert
-- 
-------------------------------------------------------------
Axel Beckert      ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     beckert@ecos.de         Voice:    +49 6133 926530
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: Why no semicolon at the end of lines?

Posted by Kee Hinckley <na...@somewhere.com>.
At 7:19 PM +0100 3/25/02, Axel Beckert - ecos gmbh wrote:
>If it's 2.0b4 (but not 2.0b6 or later), try to set
>
>		    PerlSetEnv EMBPERL_EP1COMPAT 1

Right, I forgot that one.  It should work.  But still, I'd push the 
ISP to move to b7, then you both get what you want.  (Assuming they 
don't run into namespace conflicts--I still can't get them both to 
run at the same time.)
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

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


Re: Why no semicolon at the end of lines?

Posted by Axel Beckert - ecos gmbh <be...@ecos.de>.
Hi!

On Mon, Mar 25, 2002 at 03:02:33PM +0000, Chris Allen wrote:
> Subject: Why no semicolon at the end of lines?

For speedup reasons there is only one statement allowed inside Embperl
2.x's [+ +] blocks. In Embperl 1.x, there was allowed more than one
statement.

> Our main ISP just upgraded their Embperl to 2.0b4 without telling
> us - :-( Unfortunately, nearly all our code is in the form:
> 
> [+ some_statememt(); +]
> 
> so it breaks because of the semicolon. We have thousands of lines of
> web site code that don't work now!
> 
> Is there an easy workaround (option???) to turn off this problem with
> a semicolon at the end of a line? I don't mind if things run slow -
> I would just like them all to run!!

If it's 2.0b4 (but not 2.0b6 or later), try to set

		    PerlSetEnv EMBPERL_EP1COMPAT 1

at the top level of your httpd.conf, then Embperl 2.0b4 should just
behave the same like Embperl 1.3b7.

But usually you should use this one a production machine, because it
isn't tested as good as 1.3b7 itself.

And please remember, that the Embperl 1.x compatibility mode has
disappeared in 2.0b6 (because it isn't needed anymore because of a
name space change), so that this fix won't work anymore, if your ISP
updates to 2.0b6 or later.

Other methods, which work, but need to change all files with
semicolons inside [+ +]:

+ If there is a single statement inside [+ +], just remove the
  semicolon, e.g. with perl inline edit, e.g. something like

		perl -pe 's/;\s+\+\]/ +]/g;' -i *.epl

  to change all files at once. (Be careful, perl -i can destroy a lot.)

+ Else if you have more than one statements inside a [+ +] block,
  surround everything with a do { ... } block.

See also the README.v2 of your Embperl version. E.g. the README.v2 for
Embperl 2.0b5 (and earlier) is available at

      ftp://ftp.dev.ecos.de/pub/perl/embperl/2.0-alpha/README.v2

and the README.v2 for Embperl 2.0b6 and later is available at

	   ftp://ftp.dev.ecos.de/pub/perl/embperl/README.v2

HTH.

            Regards, Axel Beckert
-- 
-------------------------------------------------------------
Axel Beckert      ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     beckert@ecos.de         Voice:    +49 6133 926530
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: Why no semicolon at the end of lines?

Posted by Kee Hinckley <na...@somewhere.com>.
At 3:02 PM +0000 3/25/02, Chris Allen wrote:
>Our main ISP just upgraded their Embperl to 2.0b4 without telling
>us - :-( Unfortunately, nearly all our code is in the form:
>
>[+ some_statememt(); +]
>
>so it breaks because of the semicolon. We have thousands of lines of web site
>code that don't work now!

That's a bizarre upgrade decision.  Not only has it been made clear 
that Embperl 2.0 isn't production ready, but that's 3 revs out of 
date.  If they'd made the move at b7 it would be okay, because they 
could run both (in theory).

Gerald's on vacation for two weeks, but I'm not aware of any 
workaround other than taking out the semi-colons (which will work in 
both versions) or going back to Embperl.  There is one global change 
you could make, but it's kind of ugly:

	[+ do {some-statement(); } +]

will work regardless of how many statements there are, and whether or 
not they have semi-colons.  That also works in the old version.

But the restriction now is that the code inside [++] must be a 
single complete (up to but not including the semi-colon) statement. 
Something to do with out the new parser is written.

I'd highly recommend that the ISP go back to HTML::Embperl 1.x and if 
they are going to move to 2.0, do it with Embperl 2.0b7.
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
nazgul@somewhere.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

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