--- nfo/perl/libs/Data/Storage.pm 2002/12/11 06:53:19 1.11 +++ nfo/perl/libs/Data/Storage.pm 2002/12/12 02:50:15 1.12 @@ -1,4 +1,4 @@ -# $Id: Storage.pm,v 1.11 2002/12/11 06:53:19 joko Exp $ +# $Id: Storage.pm,v 1.12 2002/12/12 02:50:15 joko Exp $ # # Copyright (c) 2002 Andreas Motl # @@ -7,6 +7,10 @@ ############################################ # # $Log: Storage.pm,v $ +# Revision 1.12 2002/12/12 02:50:15 joko +# + this now (unfortunately) needs DBI for some helper functions +# + TODO: these have to be refactored to another scope! (soon!) +# # Revision 1.11 2002/12/11 06:53:19 joko # + updated pod # @@ -199,6 +203,9 @@ use Data::Storage::Locator; use Data::Dumper; +# TODO: wipe out! +use DBI; + # TODO: actually implement level (integrate with Log::Dispatch) my $TRACELEVEL = 0; @@ -364,6 +371,19 @@ 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}; @@ -381,14 +401,6 @@ } } -sub testAvailability { - my $self = shift; - my $status = $self->testDsn(); - $self->{locator}->{status}->{available} = $status; - return $status; -} - - sub dropDb { my $self = shift; my $dsn = $self->{locator}->{dbi}->{dsn}; @@ -416,11 +428,6 @@ return $ok; } -sub isConnected { - my $self = shift; - return 1 if $self->{STORAGEHANDLE}; -} - 1; __END__