On Tue, Feb 11, 2003 at 01:58:31PM -0800, Christopher R. Baker wrote:
> 
> Here's an interesting little bug that's been driving me crazy and a quick fix to it. 
>It only appears when using Oracle's OS authentication on a script called with the -w 
>flag
> 
>     #!/usr/local/bin/perl
> 
>     use strict;
>     use warnings 'all';
>     use Carp();
>     use DBI;
> 
>     # We are connecting using Oracle's OS Authentication
>     # See:
>     # http://www.geocities.com/SiliconValley/Heights/6616/ops.html
>     # http://www.bijoos.com/oratom/ot_199808.htm
>     my $dbh = DBI->connect( "dbi:Oracle:") || die($DBI::errstr);

You could just pass in an empty username (or "/" also works I believe).

> Here's a diff that shows how to get rid of it:
> 
> $> diff /usr/local/lib/perl5/site_perl/5.6.1/sparc-solaris/DBD/Oracle.pm 
>lib/perl/site/DBD/Oracle.pm
> 208,209c208,209
> <       if (DBD::Oracle::ORA_OCI() >= 8) {
> <           $dbname = $1 if !$dbname && $user =~ s/\@(.*)//s;
> ---
> >       if (DBD::Oracle::ORA_OCI() && DBD::Oracle::ORA_OCI() >= 8) {
> >           $dbname = $1 if !$dbname && $user && $user =~ s/\@(.*)//s;
> 
> Much thanks for your work on this most wonderful framework!

Thanks.

Tim.

Reply via email to