On Sat, Jul 05, 2025 at 08:30:06PM +0100, Gavin Smith wrote:
> I used a loop like this:
> 
>       # Find the first subordinate section, which should appear first
>       # in the menu.
>       my $first_child = $section_children->[0];
>       while (!defined($first_child->{'associated_node'})
>                and defined($first_child->{'section_directions'})
>                and defined($first_child->{'section_directions'}->{'next'})) {
>         $first_child = $first_child->{'section_directions'}->{'next'};
>       }
> 
>       my $first_child_node_relations = $first_child->{'associated_node'};
>       next if !defined($first_child_node_relations);

Looks good to me.

-- 
Pat

Reply via email to