Fixed typo
[dbsrgits/DBM-Deep.git] / lib / DBM / Deep / Engine / DBI.pm
index 30af59f..b00b98a 100644 (file)
@@ -101,7 +101,10 @@ sub get_classname {
     my $self = shift;
     my ($obj) = @_;
 
-    return;
+    my $sector = $self->load_sector( $obj->_base_offset, 'refs' )
+        or return;
+
+    return $sector->get_classname;
 }
 
 sub make_reference {
@@ -238,10 +241,10 @@ sub write_value {
             
             # See whether or not we are storing ourselves to ourself.
             # Write the sector as data in this reference (keyed by $key)
-            my $value_sector = $self->load_sector( $tmpvar->_base_offset );
+            my $value_sector = $self->load_sector( $tmpvar->_base_offset, 'refs' );
             $sector->write_data({
                 key     => $key,
-                key_md5 => $self->_apply_digest( $key ),
+#                key_md5 => $self->_apply_digest( $key ),
                 value   => $value_sector,
             });
             $value_sector->increment_refcount;
@@ -308,21 +311,17 @@ sub write_value {
     return 1;
 }
 
-sub begin_work {
-    my $self = shift;
-    my ($obj) = @_;
-}
+sub begin_work { die "Transactions are not supported by this engine" } 
+sub rollback   { die "Transactions are not supported by this engine" } 
+sub commit     { die "Transactions are not supported by this engine" }
 
-sub rollback {
-    my $self = shift;
-    my ($obj) = @_;
-}
+sub supports {
+    shift;
+    my ($feature) = @_;
 
-sub commit {
-    my $self = shift;
-    my ($obj) = @_;
+    return if $feature eq 'transactions';
+    return;
 }
 
-
 1;
 __END__