You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Matthew Freake <mf...@iii.co.uk> on 2001/05/14 15:18:49 UTC

Lack of error reporting in embperl 2 ?

This isn't so much a bug in embperl 2, as it is a lack of an expected error
message

I have the following script:

<html>
<head>
</head>
<body>
[-
	$table_type=2;
-]

[$ if ($table_type == 1) $]
<table>
<tr><td>One kind of table</td></tr>
</table
[$ else $]
<table>
<tr><td>Another kind of table</td></tr>
</table>
[$ endif $]
</body>
</html>

NOTE the missing close angle bracket on the first </table> tag !

When this page is displayed, no error is thrown up and the output is all the
html except that which would have come out of the buggy if statement. 

Thanks


Matt Freake

http://www.iii.co.uk 
Interactive Investor International is a leading UK Internet personal 
finance service that provides individuals with the capability to identify, 
compare, monitor and buy online a number of financial products and services.

Interactive Investor Trading Limited, a subsidiary of Interactive Investor 
International plc, is regulated by the SFA.

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


Re: Lack of error reporting in embperl 2 ?

Posted by Jeff Sheffield <js...@buzzard.onr.com>.
> </table
> no error is thrown up and the output is all the
> html except that which would have come out of the buggy if statement. 
EmbPerl does not validate html.
I once heard that the reason that Natscape was so bloated, was because
that it tries to render these things correctly. i.e. anticipate bad 
html syntax.

you could use LWP (Lib-www) and a html validator found here www.w3.org
to procativaly test the output of your dynamic pages.

Jeff

On Mon, May 14, 2001 at 02:18:49PM +0100, Matthew Freake wrote:
> This isn't so much a bug in embperl 2, as it is a lack of an expected error
> message
> 
> I have the following script:
> 
> <html>
> <head>
> </head>
> <body>
> [-
> 	$table_type=2;
> -]
> 
> [$ if ($table_type == 1) $]
> <table>
> <tr><td>One kind of table</td></tr>
> </table
> [$ else $]
> <table>
> <tr><td>Another kind of table</td></tr>
> </table>
> [$ endif $]
> </body>
> </html>
> 
> NOTE the missing close angle bracket on the first </table> tag !
> 
> When this page is displayed, no error is thrown up and the output is all the
> html except that which would have come out of the buggy if statement. 
> 
> Thanks
> 
> 
> Matt Freake
> 
> http://www.iii.co.uk 
> Interactive Investor International is a leading UK Internet personal 
> finance service that provides individuals with the capability to identify, 
> compare, monitor and buy online a number of financial products and services.
> 
> Interactive Investor Trading Limited, a subsidiary of Interactive Investor 
> International plc, is regulated by the SFA.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
Thanks, 
Jeff

--------------------------------------------------
| When you are feelin' really down,              |
| read the Book of Job, and see                  |
| what that sombitch had to go through!          |
|                      -- Forrest Gump           |
|                      -- Winston Groom          |
--------------------------------------------------
| Jeff Sheffield                                 |
| jeff@jspot.org                                 |
| AIM=JeffShef ICQ=4340529 Yahoo=jeff_sheffield  |
| NowDocs http://www.nowdocs.com (day gig)       |
--------------------------------------------------

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


Re: Lack of error reporting in embperl 2 ?

Posted by Gerald Richter <ri...@ecos.de>.
> </table
> [$ else $]
> <table>
...
> When this page is displayed, no error is thrown up and the output is all
the
> html except that which would have come out of the buggy if statement.
>

I know that the error reporting of Embperl has to be improved, but such an
error is hard to catch. The above code becomes one html tag:

</table [$else$] <table>

you can argue that the opening < inside the tag is wrong. That's right, of
course, but if I catch it, the next one who is using JavaScript will beaten
by this because now he can't use the less than sign....

I think one point would be to try to catch the bad nesting of if/else/endif
and table, I check this out and see what I can do...

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