Use WebGUI::Pluggable::instanciate instead of string eval to load Image::Graph modules. Fixes bug #11898.
This commit is contained in:
parent
a614d4f230
commit
4b1af3de18
2 changed files with 5 additions and 5 deletions
|
|
@ -6,6 +6,7 @@ use WebGUI::Image::Palette;
|
|||
use WebGUI::Image::Font;
|
||||
use List::Util;
|
||||
use WebGUI::Utility;
|
||||
use WebGUI::Pluggable;
|
||||
|
||||
our @ISA = qw(WebGUI::Image);
|
||||
|
||||
|
|
@ -545,11 +546,9 @@ sub load {
|
|||
my $session = shift;
|
||||
my $namespace = shift;
|
||||
|
||||
my $cmd = "use $namespace";
|
||||
eval($cmd);
|
||||
|
||||
$cmd = $namespace.'->new($session)';
|
||||
my $plugin = eval($cmd);
|
||||
my $plugin = eval {
|
||||
WebGUI::Pluggable::instanciate($namespace, 'new', [$session, ]);
|
||||
};
|
||||
return $plugin;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue