[Bps-public-commit] dbix-searchbuilder branch, delete-duplicated-oracle-dsn, created. 1.59-29-g4993c4b

Ruslan Zakirov ruz at bestpractical.com
Wed May 25 17:49:21 EDT 2011


The branch, delete-duplicated-oracle-dsn has been created
        at  4993c4bc44f8d35bb7f430f3045b764063561b65 (commit)

- Log -----------------------------------------------------------------
commit 4993c4bc44f8d35bb7f430f3045b764063561b65
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu May 26 01:36:30 2011 +0400

    delete duplicated BuildDSN from Oracle handle
    
    New BuildDSN from a branch was based on generic version
    in Handle.pm when actually there was custom BuildDSN
    method. Just drop it. New one is different in the following
    parts:
    
    * requiressl is not supported by DBD::Oracle, ignore it
    * SID argument was only used when Host was not empty, otherwise
      Database argument was used to build 'dbi:Oracle:<Database>'.
      New code always use SID or Database argument as sid and
      DSN variant defined by Host only.

diff --git a/lib/DBIx/SearchBuilder/Handle/Oracle.pm b/lib/DBIx/SearchBuilder/Handle/Oracle.pm
index 1e4426d..d92f472 100755
--- a/lib/DBIx/SearchBuilder/Handle/Oracle.pm
+++ b/lib/DBIx/SearchBuilder/Handle/Oracle.pm
@@ -162,45 +162,6 @@ sub Insert  {
     return( $self->{'id'}); #Add Succeded. return the id
   }
 
-
-
-=head2  BuildDSN PARAMHASH
-
-Takes a bunch of parameters:  
-
-Required: Driver, Database or Host/SID,
-Optional: Port and RequireSSL
-
-Builds a DSN suitable for an Oracle DBI connection
-
-=cut
-
-sub BuildDSN {
-    my $self = shift;
-  my %args = ( Driver => undef,
-	       Database => undef,
-	       Host => undef,
-	       Port => undef,
-           SID => undef,
-	       RequireSSL => undef,
-	       @_);
-  
-  my $dsn = "dbi:$args{'Driver'}:";
-
-  if (defined $args{'Host'} && $args{'Host'} 
-   && defined $args{'SID'}  && $args{'SID'} ) {
-      $dsn .= "host=$args{'Host'};sid=$args{'SID'}";
-  } else {
-      $dsn .= "$args{'Database'}" if (defined $args{'Database'} && $args{'Database'});
-  }
-  $dsn .= ";port=$args{'Port'}" if (defined $args{'Port'} && $args{'Port'});
-  $dsn .= ";requiressl=1" if (defined $args{'RequireSSL'} && $args{'RequireSSL'});
-
-  $self->{'dsn'}= $dsn;
-}
-
-
-
 =head2 KnowsBLOBs     
 
 Returns 1 if the current database supports inserts of BLOBs automatically.      

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list