/[cvs]/nfo/perl/libs/Data/Storage.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Storage.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by joko, Wed Dec 11 06:53:19 2002 UTC revision 1.12 by joko, Thu Dec 12 02:50:15 2002 UTC
# Line 7  Line 7 
7  ############################################  ############################################
8  #  #
9  #  $Log$  #  $Log$
10    #  Revision 1.12  2002/12/12 02:50:15  joko
11    #  + this now (unfortunately) needs DBI for some helper functions
12    #  + TODO: these have to be refactored to another scope! (soon!)
13    #
14  #  Revision 1.11  2002/12/11 06:53:19  joko  #  Revision 1.11  2002/12/11 06:53:19  joko
15  #  + updated pod  #  + updated pod
16  #  #
# Line 199  use warnings; Line 203  use warnings;
203  use Data::Storage::Locator;  use Data::Storage::Locator;
204  use Data::Dumper;  use Data::Dumper;
205    
206    # TODO: wipe out!
207    use DBI;
208    
209  # TODO: actually implement level (integrate with Log::Dispatch)  # TODO: actually implement level (integrate with Log::Dispatch)
210  my $TRACELEVEL = 0;  my $TRACELEVEL = 0;
211    
# Line 364  sub getDbName { Line 371  sub getDbName {
371    return $database_name;    return $database_name;
372  }  }
373    
374    sub testAvailability {
375      my $self = shift;
376      my $status = $self->testDsn();
377      $self->{locator}->{status}->{available} = $status;
378      return $status;
379    }
380    
381    sub isConnected {
382      my $self = shift;
383      # TODO: REVIEW!
384      return 1 if $self->{STORAGEHANDLE};
385    }
386    
387  sub testDsn {  sub testDsn {
388    my $self = shift;    my $self = shift;
389    my $dsn = $self->{locator}->{dbi}->{dsn};    my $dsn = $self->{locator}->{dbi}->{dsn};
# Line 381  sub testDsn { Line 401  sub testDsn {
401    }    }
402  }  }
403    
 sub testAvailability {  
   my $self = shift;  
   my $status = $self->testDsn();  
   $self->{locator}->{status}->{available} = $status;  
   return $status;  
 }  
   
   
404  sub dropDb {  sub dropDb {
405    my $self = shift;    my $self = shift;
406    my $dsn = $self->{locator}->{dbi}->{dsn};    my $dsn = $self->{locator}->{dbi}->{dsn};
# Line 416  sub dropDb { Line 428  sub dropDb {
428    return $ok;    return $ok;
429  }  }
430    
 sub isConnected {  
   my $self = shift;  
   return 1 if $self->{STORAGEHANDLE};  
 }  
   
431  1;  1;
432  __END__  __END__
433    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed