> To quote one of the WROX books I have been reading on EVAL (I don't
> know which)
>
> Avoid using EVAL inside of a loop, rather EVAL the loop, as EVAL will
> REINTERPERET with EVERY ITERATION...so..using an EVAL inside of a loop
> causes a huge performance loss...and it is doubly so in a nested loop.
It is the difference between a 'q' or no 'q'.
eval q{'stuff'}; will parse and execute 'stuff' at run time; however,
eval {'stuff'}; is a form of exception handling. Here the block is parsed
at the same time as the surrounding code. I have not read any of the Wrox
books, so I won't comment on them; however, I would suggest if they do not
make the distinction between the two forms of eval you try another book.
Like, say, the Camel. For more information on eval: 'perldoc -f eval'
> Might I suggest using the DBI methods of retrieving ERROR codes REALLY
> is faster...AND: (Since this is postgres..PREPING and EXECUTING is
> useless...PG doesn't understand PREPARE the driver just allows it
> since it is a DBI call...DO is more practical here:
In what way? 'do' just calles prepare and execute for you (I did not
dig, but that is what DBI does by default, and I don't think Pg overrides
it), so you could say that it might be a tad slower because you have the
added hit of an additional method call.
-Rudy