--- nfo/perl/libs/Data/Storage/Handler/Tangram.pm 2003/01/19 02:30:05 1.25 +++ nfo/perl/libs/Data/Storage/Handler/Tangram.pm 2003/01/30 22:29:47 1.26 @@ -1,8 +1,11 @@ ############################################ # -# $Id: Tangram.pm,v 1.25 2003/01/19 02:30:05 joko Exp $ +# $Id: Tangram.pm,v 1.26 2003/01/30 22:29:47 joko Exp $ # # $Log: Tangram.pm,v $ +# Revision 1.26 2003/01/30 22:29:47 joko +# + fixed module usage (removed dependency on 'libp.pm') +# # Revision 1.25 2003/01/19 02:30:05 joko # + fix: modified call to '_initSchema' # @@ -110,13 +113,12 @@ use Tangram; use Data::Dumper; -use libp qw( getNewPerlObjectByPkgName ); +use DesignPattern::Object; use Data::Storage::Result::Tangram; use Data::Compare::Struct qw( isEmpty ); use Data::Transform::Deep qw( object2hash ); use Data::Transform::Encode qw( var2utf8 ); - # get logger instance my $logger = Log::Dispatch::Config->instance; @@ -136,7 +138,8 @@ my $self = shift; $logger->debug( __PACKAGE__ . "->_initSchema()" ); #if (!$schema_tangram) { - my $obj = getNewPerlObjectByPkgName($self->{locator}->{schema}, { EXPORT_OBJECTS => $self->{locator}->{classnames}, want_transactions => $self->{locator}->{want_transactions} } ); + #my $obj = getNewPerlObjectByPkgName($self->{locator}->{schema}, { EXPORT_OBJECTS => $self->{locator}->{classnames}, want_transactions => $self->{locator}->{want_transactions} } ); + my $obj = DesignPattern::Object->fromPackage($self->{locator}->{schema}, { 'EXPORT_OBJECTS' => $self->{locator}->{classnames}, 'want_transactions' => $self->{locator}->{want_transactions} } ); $schema_tangram = $obj->getSchema(); #} if (!$schema_tangram) { @@ -314,6 +317,8 @@ $logger->debug( __PACKAGE__ . "->configureCOREHANDLE" ); #my $subLayer = $self->_getSubLayerHandle(); + #print Dumper($self); + #exit; # apply configured modifications if (exists $self->{dbi}->{trace_level} && exists $self->{dbi}->{trace_file}) { @@ -662,4 +667,11 @@ return $storage->dropDb(); } +sub testAvailability { + my $self = shift; + my $storage = $self->_getSubLayerHandle(); + return $storage->testAvailability(); +} + 1; +__END__