File: output.pl

package info (click to toggle)
libhtml-widgets-navmenu-perl 1.1000-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 636 kB
  • sloc: perl: 8,051; makefile: 9
file content (40 lines) | stat: -rw-r--r-- 854 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/perl

use strict;
use warnings;

use HTML::Widgets::NavMenu;

my $nav_menu = HTML::Widgets::NavMenu->new(
    'path_info'    => "/me/",
    'current_host' => "default",
    'hosts'        => {
        'default' => {
            'base_url' => "http://www.hello.com/"
        },
    },
    'tree_contents' => {
        'host'      => "default",
        'value'     => "Top 1",
        'title'     => "T1 Title",
        'expand_re' => "",
        'subs'      => [
            {
                'value' => "Home",
                'url'   => "",
            },
            {
                'value' => "About Me",
                'title' => "About Myself",
                'url'   => "me/",
            },
        ],
    },
);

my $results = $nav_menu->render();

my $nav_menu_html = join( "\n", @{ $results->{'html'} } );

print $nav_menu_html;