added plain old disconnect method
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 31 Aug 2006 13:41:53 +0000 (13:41 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 31 Aug 2006 13:41:53 +0000 (13:41 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5803 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm

index 3201340..def59ab 100644 (file)
@@ -160,7 +160,12 @@ sub xact_rollback {
 sub rollback {
        my $self = shift;
        $self->xact_rollback if $self->{xact};
-       $self->session->disconnect;
+       $self->disconnect;
+}
+
+sub disconnect {
+       my $self = shift;
+       $self->session->disconnect if $self->{session};
 }
 
 
@@ -180,7 +185,7 @@ sub commit {
 # -----------------------------------------------------------------------------
 sub reset {
        my $self = shift;
-       $self->session->disconnect if $self->{session};
+       $self->disconnect;
        $$self{$_} = undef for (keys %$self);
 }