in reply to Re: Hash Tie's DESTROY & DBI
in thread Hash Tie's DESTROY & DBI

so by saying that die does not work in your script, that means that you tried and die did not work or did not produce any error (or something of that nature) or you assumed it would not, or something else? I am interested to know (since I do not know much about DBI) why it would not work there.

I know many do not like to useeval because of security reasons but, if you used it (in correspondence w/ $@) would that catch the errors if die did/could not? or would it not work for the same reason die would not/could not?

thank you for your time


Replies are listed 'Best First'.
Re: Re: Re: Hash Tie's DESTROY & DBI
by runrig (Abbot) on Jan 11, 2002 at 05:23 UTC
    I know many do not like to use eval because of security reasons

    eval "$data_from_tainted_source" has both security and performance issues.
    eval { block_of_code() } does not (at least not due to the eval itself), and die'ing in an eval then checking $@ is a common method of 'exception handling' in perl.