$SIG{__DIE__} is a can of worms. Why doesn't try { } localize it...?
This commit is contained in:
parent
096fe5ebaa
commit
819cef2c17
2 changed files with 3 additions and 3 deletions
|
|
@ -470,7 +470,7 @@ sub graph {
|
|||
|
||||
my $session = $self->session;
|
||||
|
||||
eval { require GraphViz };
|
||||
eval { local $SIG{'__DIE__'}; require GraphViz };
|
||||
if ($@) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -710,7 +710,7 @@ sub www_graph {
|
|||
|
||||
my $i18n = WebGUI::International->new($session, "Asset_Survey");
|
||||
|
||||
eval { require GraphViz };
|
||||
eval { local $SIG{'__DIE__'}; require GraphViz };
|
||||
if ($@) {
|
||||
return '<h1>' . $i18n->get('survey visualization') . '</h1>Survey Visualization requires the GraphViz module';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; } ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue