Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Web based perl REPL

by stvn (Monsignor)
on Dec 03, 2006 at 21:08 UTC ( [id://587545]=note: print w/replies, xml ) Need Help??


in reply to Web based perl REPL

Looks pretty cool, one problem I noticed was in your handling of \n in the P of the loop. I tried this:

> print $_, "\n" for (1 .. 10)
and it only printed '1', and nothing else. I suspect you need to read in all the lines returned, then join it with a HTML br tag or something.

-stvn

Replies are listed 'Best First'.
Re^2: Web based perl REPL
by BUU (Prior) on Dec 03, 2006 at 21:11 UTC
    You are very correct, I'm afraid it's been a long standing bug. My essential problem is I have no real way of telling when the output has ended, so at the moment I just read the first line and return that.

    Also while I'm listing bugs, it doesn't handle STDERR very well. Or at all. =[
      Perhaps you could append a ;print "END_OF_OUTPUT\n"; to the code that was sent in and then read until that. I'm not sure how your loop works, but you could probably also append a value to "END_OF_OUTPUT" that doesn't occur within the code.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://587545]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-29 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found