$SIG{__DIE__} is a can of worms. Why doesn't try { } localize it...?

This commit is contained in:
Scott Walters 2011-05-22 15:36:40 -04:00
parent 096fe5ebaa
commit 819cef2c17
2 changed files with 3 additions and 3 deletions

View file

@ -56,7 +56,7 @@ sub addField {
# Load the class
# Try to load the WebGUI Field first in case we conveniently overlap with a common name
# (like Readonly)
if ( $INC{'WebGUI/Form/'. ucfirst $file} || try { require 'WebGUI/Form/' . ucfirst $file } ) {
if ( $INC{'WebGUI/Form/'. ucfirst $file} || try { local $SIG{'__DIE__'}; require 'WebGUI/Form/' . ucfirst $file } ) {
$type = 'WebGUI::Form::' . ucfirst $type;
}
elsif ( !$INC{$file} && !try { require $file; } ) {