Implement multiple inheritance in Help, allowing variables, fields and related
topics to be inherited from multiple entries. Operation/Help now also gives the help hash a default ISA array, to make downstream processing by tests and documentation compilers easier. Convert existing Help entries that already used ISA to have an array ref instead of a singular hash ref. Also update the Help skeleton to show the new syntax.
This commit is contained in:
parent
d7450926be
commit
b4597e50e5
14 changed files with 105 additions and 39 deletions
|
|
@ -54,8 +54,12 @@ sub _load {
|
|||
my $help = dclone($hash);
|
||||
foreach my $tag (keys %{ $help }) {
|
||||
$help->{$tag}{related} = [ _related($session, $help->{$tag}{related}) ];
|
||||
if ($help->{$tag}{isa}{namespace}) {
|
||||
my $isa = $hash->{$tag}{isa};
|
||||
##Add an ISA link unless it already exists.
|
||||
##This simplifies handling later.
|
||||
unless (exists $help->{$tag}{isa} and ref $help->{$tag}{isa} eq 'ARRAY') {
|
||||
$help->{$tag}{isa} = [];
|
||||
}
|
||||
foreach my $isa ( @{ $help->{$tag}{isa} } ) {
|
||||
my $other = _load($session, $isa->{namespace});
|
||||
my $otherHelp = $other->{ $isa->{tag} };
|
||||
my $add = $otherHelp->{fields};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue