From ebdcd47f8dc2e883dae182e29fc06af532445fe4 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 17 May 2006 18:28:31 +0000 Subject: [PATCH] POD and code fix for Storage object delete method --- lib/WebGUI/Storage.pm | 4 ++-- t/Storage.t | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/WebGUI/Storage.pm b/lib/WebGUI/Storage.pm index ff721f81f..ad1758ceb 100644 --- a/lib/WebGUI/Storage.pm +++ b/lib/WebGUI/Storage.pm @@ -369,7 +369,7 @@ sub createTemp { =head2 delete ( ) -Deletes this storage location and its contents (if any) from the filesystem and destroy's the object. +Deletes this storage location and its contents (if any) from the filesystem. =cut @@ -377,7 +377,7 @@ sub delete { my $self = shift; my $path = $self->getPath; rmtree($path) if ($path); - undef $self; + return; } #------------------------------------------------------------------- diff --git a/t/Storage.t b/t/Storage.t index de8974e94..589a74a6f 100644 --- a/t/Storage.t +++ b/t/Storage.t @@ -18,7 +18,7 @@ use WebGUI::Storage; use Test::More; -plan tests => 9; # increment this value for each test you create +plan tests => 7; # increment this value for each test you create my $session = WebGUI::Test->session; @@ -46,9 +46,6 @@ ok( (-e $storageDir1 and -d $storageDir1), "Storage location created and is a di $storage1->delete; -is ( $storage1, undef, 'Object undeffed'); -is ( ref $storage1, 'SCALAR', 'Object undeffed'); - END { ref $storage1 eq "WebGUI::Storage" and $storage1->delete; }