Re: $SIG{INT} tampering during DBI->connect on Oracle

Tim Bunce <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Mon, Nov 15, 2010 at 10:04:56AM -0800, Brian Phillips wrote:
> -	DBD::Oracle::db::_login($dbh, $dbname, $user, $auth, $attr)
> -	    or return undef;
> +    {
> +        my @local_signals = @{ $attr->{ora_local_signals} || [] };
> +        local @SIG{@local_signals} if @local_signals;
> +        DBD::Oracle::db::_login($dbh, $dbname, $user, $auth, $attr)
> +            or return undef;
> +    }

Two minor nit-picks...

The name ora_local_signals doesn't convey what it does.
ora_connect_with_default_signals is long but descriptive.

Performance wise, some apps connect frequently so keeping the default
path lightweight seems worthwhile:

           local @SIG{ @{ $attr->{ora_local_signals}||[] } }
                if $attr->{ora_local_signals};

Tim
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.