Mercurial > pub > Impl
diff Lib/IMPL/Security/Context.pm @ 97:964587c5183c
Added SecureCall to Web QueryHandlers stack
many bug fixes to Security and Web Application modules
author | wizard |
---|---|
date | Tue, 04 May 2010 04:04:37 +0400 |
parents | 4c55aed00ff2 |
children | 92c850d0bdb9 |
line wrap: on
line diff
--- a/Lib/IMPL/Security/Context.pm Fri Apr 30 15:03:38 2010 +0400 +++ b/Lib/IMPL/Security/Context.pm Tue May 04 04:04:37 2010 +0400 @@ -30,14 +30,20 @@ my ($this,$code) = @_; my $old = $current; + $current = $this; my $result; - local $@; - eval { - $result = $code->(); - }; + my $e; + + { + local $@; + eval { + $result = $code->(); + }; + $e = $@; + } $current = $old; - if($@) { - die $@; + if($e) { + die $e; } else { return $result; }