Re: eval and Execute and subs

2003-03-19 Thread Gerald Richter
> HTML::EmbperlObject > > $obj = Execute({ object => $file }); > try { > $obj->foo(); > } otherwise { > $this->Error(0); # $this is the ref to this page object > handle error > }; > > This doesn't work. The page still returns with an error value, and > my handler in the EmbperlObject template se

eval and Execute and subs

2003-03-17 Thread Kee Hinckley
HTML::EmbperlObject $obj = Execute({ object => $file }); try { $obj->foo(); } otherwise { $this->Error(0); # $this is the ref to this page object handle error }; This doesn't work. The page still returns with an error value, and my handler in the EmbperlObject templat

Re: eval (was: Embperl 2.0b7 approx. 10 times slower than 1.3.x)

2002-04-16 Thread Gerald Richter
> > > > 1. I'm unsure whether it's good to use eval around so much code... is > > it the most efficient method? You could wrap it just around the > > ->prepare and ->execute. Actually, you don't eval at all. The critical > > DBI method calls re

Re: eval {} die and $SIG{ALRM}

2002-02-22 Thread Luiz Fernando B. Ribeiro
Hi all, I have solved the problem using a module called Exception.pm, it provides a very good interface for exception handling and I was able to bypass the die bug not being trapped by the eval block. Best wishes, Luiz Fernando B. Ribeiro use Exception qw(:all); ... $fifo = "$

Re: eval {} die and $SIG{ALRM}

2002-02-20 Thread Kee Hinckley
At 7:47 AM +0100 2/20/02, Gerald Richter wrote: >Hello, >> >>I'm having trouble with the common technique (alarm eval{}) to avoid >>blocking operations. The die message is always going to the browser > > even when trapped by the eval block. > > I

Re: eval {} die and $SIG{ALRM}

2002-02-19 Thread Gerald Richter
Hello, > > I'm having trouble with the common technique (alarm eval{}) to avoid > blocking operations. The die message is always going to the browser > even when trapped by the eval block. > I don't have an idea at the moment what's going wrong here. Em

Re: eval {} die and $SIG{ALRM}

2002-02-19 Thread Angus Lees
On Tue, Feb 19, 2002 at 04:48:13PM -0300, Luiz Fernando B. Ribeiro wrote: > I'm having trouble with the common technique (alarm eval{}) to avoid > blocking operations. The die message is always going to the browser > even when trapped by the eval block. > > eval { try

eval {} die and $SIG{ALRM}

2002-02-19 Thread Luiz Fernando B. Ribeiro
Hello, I'm having trouble with the common technique (alarm eval{}) to avoid blocking operations. The die message is always going to the browser even when trapped by the eval block. eval { local $SIG{ALRM} = sub {die}; alarm 3; open(FIFO,">$fifo");

RE: eval

2000-03-21 Thread Ilia Lobsanov
oops never mind my last post. it was my problem. nothing wrong with Embperl. Keep up the good work everybody! :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

eval

2000-03-21 Thread Ilia Lobsanov
esults' use lib '../../'; eval "use perllib::$app"; print $@ if $@; use IO::Scalar; $s = undef; tie *OUT, 'IO::Scalar', \$s; # override OUT handle so that print statements will go to $s $SaveSTDOUT = select; # save current handle select OUT; # set default handl