comparison 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
comparison
equal deleted inserted replaced
96:4c55aed00ff2 97:964587c5183c
28 28
29 sub Impersonate { 29 sub Impersonate {
30 my ($this,$code) = @_; 30 my ($this,$code) = @_;
31 31
32 my $old = $current; 32 my $old = $current;
33 $current = $this;
33 my $result; 34 my $result;
34 local $@; 35 my $e;
35 eval { 36
36 $result = $code->(); 37 {
37 }; 38 local $@;
39 eval {
40 $result = $code->();
41 };
42 $e = $@;
43 }
38 $current = $old; 44 $current = $old;
39 if($@) { 45 if($e) {
40 die $@; 46 die $e;
41 } else { 47 } else {
42 return $result; 48 return $result;
43 } 49 }
44 } 50 }
45 51