--- nfo/perl/libs/Data/Storage.pm 2003/01/30 21:42:22 1.17 +++ nfo/perl/libs/Data/Storage.pm 2003/01/30 22:12:17 1.18 @@ -1,6 +1,6 @@ ## ------------------------------------------------------------------------ ## -## $Id: Storage.pm,v 1.17 2003/01/30 21:42:22 joko Exp $ +## $Id: Storage.pm,v 1.18 2003/01/30 22:12:17 joko Exp $ ## ## Copyright (c) 2002 Andreas Motl ## @@ -9,6 +9,9 @@ ## ------------------------------------------------------------------------ ## ## $Log: Storage.pm,v $ +## Revision 1.18 2003/01/30 22:12:17 joko +## - removed/refactored old code: ->Data::Storage::Handler::Tangram|DBI +## ## Revision 1.17 2003/01/30 21:42:22 joko ## + minor update: renamed method ## @@ -181,15 +184,6 @@ } -sub normalizeArgs { - my %args = @_; - if (!$args{dsn} && $args{meta}{dsn}) { - $args{dsn} = $args{meta}{dsn}; - } - my @result = %args; - return @result; -} - sub _accessStorageHandle { my $self = shift; # TODO: to some tracelevel! @@ -297,45 +291,6 @@ $logger->remove($name); } -=pod -sub getDbName { - my $self = shift; - my $dsn = $self->{locator}->{dbi}->{dsn}; - $dsn =~ m/database=(.+?);/; - my $database_name = $1; - return $database_name; -} - -sub testAvailability { - my $self = shift; - my $status = $self->testDsn(); - $self->{locator}->{status}->{available} = $status; - return $status; -} - -sub isConnected { - my $self = shift; - # TODO: REVIEW! - return 1 if $self->{STORAGEHANDLE}; -} - -sub testDsn { - my $self = shift; - my $dsn = $self->{locator}->{dbi}->{dsn}; - my $result; - if ( my $dbh = DBI->connect($dsn, '', '', { - PrintError => 0, - } ) ) { - - # TODO: REVIEW - $dbh->disconnect(); - - return 1; - } else { - $logger->warning( __PACKAGE__ . "[$self->{locator}->{type}]" . "->testDsn(): " . "DBI-error: " . $DBI::errstr ); - } -} -=cut 1; __END__