in reply to Re: Problem of scope : $SIG{__WARN__} in a module...
in thread Problem of scope : $SIG{__WARN__} in a module...

That's a nice idea, but won't it somewhat slow down everything? I'll give it a try.
  • Comment on Re^2: Problem of scope : $SIG{__WARN__} in a module...

Replies are listed 'Best First'.
Re^3: Problem of scope : $SIG{__WARN__} in a module...
by chb (Deacon) on Dec 07, 2004 at 11:21 UTC
    Depends on the eval :-) string eval -> slow, block eval -> as fast as any other perl snippet
Re^3: Problem of scope : $SIG{__WARN__} in a module...
by astroboy (Chaplain) on Dec 08, 2004 at 09:25 UTC

    Using eval of a block is the recommendation in the DBI documentation:

    The recommended way to implement robust transactions in Perl applications is to use RaiseError and eval { ... } (which is very fast, unlike eval "...").