diff Lib/IMPL/Object/Disposable.pm @ 328:63709a4e6da0

Security framework refactoring
author cin
date Mon, 03 Jun 2013 03:28:01 +0400
parents ad93c9f4dd93
children
line wrap: on
line diff
--- a/Lib/IMPL/Object/Disposable.pm	Thu May 30 20:31:37 2013 +0400
+++ b/Lib/IMPL/Object/Disposable.pm	Mon Jun 03 03:28:01 2013 +0400
@@ -1,5 +1,6 @@
 package IMPL::Object::Disposable;
 use strict;
+require IMPL::Object::AutoDispose;
 
 our $Strict = 1;
 
@@ -15,14 +16,8 @@
     warn sprintf('The object %s were marked as disposable but isn\'t disposed properly', $this->can('ToString') ? $this->ToString() : (ref $this || $this) );
 }
 
-sub superDispose {
-    my ($this) = @_;
-
-    my $package = caller;
-
-    no strict 'refs';
-
-    ($_.'::Dispose')->($this) foreach @{$package.'::ISA'};
+sub AutoPtr {
+    IMPL::Object::AutoDispose->new(shift);
 }
 
 package IMPL::Object::Disposed;