On Tue, 16 Apr 2002, Wim Kerkhoff wrote:
> On 16-Apr-2002 Alexander Hartmaier wrote:
>> I just reworte view-table.epl...it isn't faster than before....
>>
>> Here is the new version (the display of the number of lines isn't workling
>> any more :(
>> Maybe you can tell me what i do false:
>
> Hmmm...
>
> 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 return true or false, which you can catch:
>
> $sth = $dbh->prepare($sqlcmd) || perish ($dbh->errstr);
> $sth->execute || perish ($dbh->errstr);
>
> Something to experiment with perhaps.
I've written and worked with perl scripts which eval *much* larger
blocks of code; however, they have always been 'code which write code',
and the eval was an alternative to using a temporary file. Generally
speaking, this gets a slight performance gain, which it probably
wouldn't if large evals in general were a performance loss. (That is,
doing it via eval, rather than writing to a file and doing or requiring
it.)
That being said, as you mentioned, it serves no point here. I have a
nagging suspicion the same goes for local($SIG{__DIE__}), but I'm having
trouble convincing myself this is definitely true.
Ed
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]