in reply to Re: optimization help
in thread optimization help

eval BLOCK and eval STRING are completely different. It's unfortunate that they share the same name. There's (almost) nothing wrong with the code your friend wrote.

Replies are listed 'Best First'.
Re^3: optimization help
by naikonta (Curate) on Oct 17, 2007 at 08:09 UTC
    Agreed. It was an eval BLOCK so it happened at compiled-time. I just didn't (and still don't) see any advantage other than aggregating fatal errors checking, such as
    my $dbh = get_db(); # with RaiseError => 1 eval { my $some_sql = get_some_sql_code(); $dbh->do($some_sql); my $another_sql = get_another_sql_code(); $dbh->do($another_sql); ... more query execution }; die $@ if $@;

    Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!