From c23e29cdd727fecd20d67f1fc9a5fe14bb6d6297 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 30 May 2006 14:04:26 +0000 Subject: [PATCH] no luck --- lib/WebGUI/Operation/Help.pm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/WebGUI/Operation/Help.pm b/lib/WebGUI/Operation/Help.pm index ed8b12c87..8f292fe1a 100644 --- a/lib/WebGUI/Operation/Help.pm +++ b/lib/WebGUI/Operation/Help.pm @@ -44,27 +44,27 @@ sub _load { my $cmd = "WebGUI::Help::".$namespace; my $load = sprintf 'use %-s; $%-s::HELP;', $cmd, $cmd; my $hash = eval($load); + my %help = %{$hash}; unless ($@) { - foreach my $tag (keys %{$hash}) { - if ($hash->{$tag}{isa}{namespace}) { - my $other = _load($session, $hash->{$tag}{isa}{namespace}); - my $add = $other->{$hash->{$tag}{isa}{tag}}{fields}; - @{$hash->{$tag}{fields}} = (@{$hash->{$tag}{fields}}, @{$add}); - $add = $other->{$hash->{$tag}{isa}{tag}}{related}; - @{$hash->{$tag}{related}} = (@{$hash->{$tag}{related}}, @{$add}); - $add = $other->{$hash->{$tag}{isa}{tag}}{variables}; + foreach my $tag (keys %help) { + if ($help{$tag}{isa}{namespace}) { + my $other = _load($session, $help{$tag}{isa}{namespace}); + my $add = $other->{$help{$tag}{isa}{tag}}{fields}; + @{$help{$tag}{fields}} = (@{$help{$tag}{fields}}, @{$add}); + $add = $other->{$help{$tag}{isa}{tag}}{related}; + @{$help{$tag}{related}} = (@{$help{$tag}{related}}, @{$add}); + $add = $other->{$help{$tag}{isa}{tag}}{variables}; foreach my $row (@{$add}) { - push(@{$hash->{$tag}{variables}}, { + push(@{$help{$tag}{variables}}, { name=> $row->{name}, description => $row->{description}, - namespace => $row->{namespace} || $hash->{$tag}{isa}{namespace} + namespace => $row->{namespace} || $help{$tag}{isa}{namespace} }); } } } - return $hash - } - else { + return \%help; + } else { $session->errorHandler->error("Help failed to compile: $namespace. ".$@); return {}; }