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

Re: Re: Re: Re: Perlmonk's "best pratices" in the real world

by LTjake (Prior)
on Nov 13, 2003 at 17:49 UTC ( [id://306867]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Perlmonk's "best pratices" in the real world
in thread Perlmonk's "best pratices" in the real world

One thing I don't like about it is that you can't write to the browser on your own, but have to return the complete output at the end of the sub. This is a major problem for one part of my application, where reports are generated from a database. The reports could get quite large--larger than I'd want to load into memory at once if I could avoid it.

You can do something like this, if you want:

sub mymode { #... print $self->_send_headers; # print your data; $self->teardown; exit( 0 ); }

This is the method suggested on the CGI::App wiki to do an "early exit."

--
"To err is human, but to really foul things up you need a computer." --Paul Ehrlich

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-20 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found