plug-ins are now dynamically loaded

This commit is contained in:
JT Smith 2004-05-28 16:00:28 +00:00
parent f83b2c6086
commit 8266dfd69a
11 changed files with 47 additions and 36 deletions

View file

@ -52,6 +52,9 @@ sub process {
$var{'contentTypes.label'} = WebGUI::International::get(1083);
foreach my $namespace (@{$session{config}{wobjects}}) {
my $cmd = "WebGUI::Wobject::".$namespace;
my $load = "use ".$cmd;
eval($load);
WebGUI::ErrorHandler::warn("Wobject failed to compile: $cmd.".$@) if($@);
my $w = eval{$cmd->new({namespace=>$namespace,wobjectId=>"new"})};
if ($@) {
WebGUI::ErrorHandler::warn("Could not use wobject $namespace because: ".$@);