Re: Embperl emergency...
The $escmode thing doesn't seem to work for me. In my srm.conf I have optRedirectStdout set. My embperl code looks a bit like this... [- use foo; -] [- $escmode = 1; -] You need to set to to zero! [- foo-bar() -] And inside foo.pm bar() { print EOF HTML EOF } I've used $escmode before inside regular embperl successfully, but it doesn't seem to be doing for me in this case. I also tried the full name of escmode (HTML::escmode or whatever it is Gerald suggested. Don't have it in front of me now). I was using 1.2.0b5 I believe, and it all seemed to work. Now the html comes out before the http headers unless I set optRedirectStdout. There was no change in this behaviour. That buffering of the output (which causes your problem), is introduced somewhere in 0.1x (3 years ago :-) Anyway if it works, like you write in your other mail, then everything is fine :-) Gerald
Embperl Emergency!!!
Hi, I just upgraded to Embperl 1.2.1 and I've broken my internet server!$% It appears the problem is I have some perl routines that go print EOF HTML EOF etc.. That was probably the wrong thing to do. I think the HTML is coming out before the http headers. Well I've tried the $optRedirectStdout feature but all the HTML is quoted so I get lt;HTMLgt; etc which is no good. I've tried $optDisableHtmlScan, but that doesn't help. I've tried to print to OUT instead of STDOUT, but OUT doesn't seem to be in the right namespace (No, I'm not a perl guru). And I've tried to pass the OUT descriptor to the routine using \*OUT or *OUT{IO}, but none of this works. HELP! -- Chris Bitmead mailto:[EMAIL PROTECTED]
RE: Embperl Emergency!!!
Hi, I just upgraded to Embperl 1.2.1 and I've broken my internet server!$% It appears the problem is I have some perl routines that go print EOF HTML EOF From which version did you upgrade? This problem should also be there for all older versions I remember... etc.. That was probably the wrong thing to do. I think the HTML is coming out before the http headers. Well I've tried the $optRedirectStdout feature but all the HTML is quoted so I get lt;HTMLgt; etc which is no good. I've tried $optDisableHtmlScan, but that doesn't help. I've tried to print to OUT instead of STDOUT, but OUT doesn't seem to be in the right namespace (No, I'm not a perl guru). And I've tried to pass the OUT descriptor to the routine using \*OUT or *OUT{IO}, but none of this works. Try { local $HTML::Embperl::escmode = 0 ; print HTML::Embperl::OUT EOF HTML EOF } This should work, but it's just a quick hack. I do not promise that Embperl 1.4 or 2.0 will support these global variables, also I guess they will do so. (1.3 surely will not change these things) Gerald - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925151 WWW:http://www.ecos.de Fax: +49 6133 925152 -
Embperl Emergency..
Hi, I have just upgraded to Embperl 1.2.1 and I seem to have stuffed my web server. The problem seems to be that I have some perl subroutines that write directly to STDOUT... print EOF HTML EOF This is probably the wrong thing to do, but it used to work fine. Anyway, I've now tried $optRedirectStdout. That's an improvement but it quotes everything lt;HTMLgt; which is not what I want. I've tried $optDisableHtmlScan but that doesn't help either. I've tried printing to OUT, but the routines are in another perl module and it can't find OUT for some reason (I'm not a perl guru). I've tried passing OUT to the routines as a parameter but I can't figure the syntax or something because it doesn't work for me (using the \*OUT or *OUT{IO} syntax. Help! Need to get this server back on line. -- Chris Bitmead mailto:[EMAIL PROTECTED]
Embperl emergency
Hi, I've just upgraded to Embperl 1.2.1 and I've stuffed my webserver. It appears the problem is that I've been writing code like this.. print EOF HTML EOF This used to work, but I guess it's wrong. I've tried $optRedirectStdout but it quotes everything... lt;HTMLgt; which is not what I want. I've tried $optDisableHtmlScan, but that doesn't seem to help in this case. The code in question is in another perl module that doesn't seem to have access to OUT, so I can't print to that. I've tried passing OUT as a parameter to the subroutine (\*OUT or *OUT{IO}) but I can't seem to get the syntax right or something because it just complains that $OUT is undefined. Can someone help get my webserver back on line!? Thanks, Chris Bitmead mailto:[EMAIL PROTECTED]
Re: Embperl emergency
print qq(Using qq() works remarkably well and preserves newlines, tabs, etc. Here docs are... legacy, in my mind and are less friendly to editors (such as emacs). See if moving to qq() solves your problems, if not, then ... I dunno.); This is more along the lines of a PS than anything else, but it works for all interpolated envs in perl. Ex: print qq(the result of 1 + 1 = @{[1 + 1]}\n); Inline code evaluation w/in a string... combine this w/ the ternery operator ((EXPR) ? (TRUE) : (FALSE)) and you've got a pretty inline scripting tool that's not emb perl. The only gotcha is that you can't have multiple statements (ex: @{[ EXPR; EXPR2; EXPR3 ]}). That should turn up an error. Anyway, fyi. --SC -- Sean Chittenden [EMAIL PROTECTED] My CODE of ETHICS is vacationing at famed SCHROON LAKE in upstate New York!! On Thu, 13 Jan 2000, Chris wrote: Date: Thu, 13 Jan 2000 07:55:36 +1100 From: Chris [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Embperl emergency Hi, I've just upgraded to Embperl 1.2.1 and I've stuffed my webserver. It appears the problem is that I've been writing code like this.. print EOF HTML EOF This used to work, but I guess it's wrong. I've tried $optRedirectStdout but it quotes everything... lt;HTMLgt; which is not what I want. I've tried $optDisableHtmlScan, but that doesn't seem to help in this case. The code in question is in another perl module that doesn't seem to have access to OUT, so I can't print to that. I've tried passing OUT as a parameter to the subroutine (\*OUT or *OUT{IO}) but I can't seem to get the syntax right or something because it just complains that $OUT is undefined. Can someone help get my webserver back on line!? Thanks, Chris Bitmead mailto:[EMAIL PROTECTED]
Embperl emergency...
Sorry if you got my previous mail a few times. I successfully subscribed to modperl (including auth) and then... nothing. Not sure what's happening there, but I'm subscribed now under a different email. Should be ok now. (cross fingers). The $escmode thing doesn't seem to work for me. In my srm.conf I have optRedirectStdout set. My embperl code looks a bit like this... [- use foo; -] [- $escmode = 1; -] [- foo-bar() -] And inside foo.pm bar() { print EOF HTML EOF } I've used $escmode before inside regular embperl successfully, but it doesn't seem to be doing for me in this case. I also tried the full name of escmode (HTML::escmode or whatever it is Gerald suggested. Don't have it in front of me now). I was using 1.2.0b5 I believe, and it all seemed to work. Now the html comes out before the http headers unless I set optRedirectStdout.