JAPHs for fun and profit.
",
},
{
- 'path' => "open-source/yowza/",
- 'title' => "A Wonderful Yowza",
+ 'path' => "open-source/yowza/",
+ 'title' => "A Wonderful Yowza",
'content' => "
[% FOREACH c = breadcrumbs %]
-[% UNLESS loop.first %] → [% END %]
+[% UNLESS loop.first %] → [% END %]
[% c.label %]
@@ -479,14 +507,12 @@
EOF
- $template->process(\$nav_links_template, $vars);
+ $template->process( \$nav_links_template, $vars );
}
-if (!$found)
+if ( !$found )
{
- eval {
- render_page($path_info, "Not a title", "Page Contents");
- };
+ eval { render_page( $path_info, "Not a title", "Page Contents" ); };
if ($@)
{
$@->CGIpm_perform_redirect($cgi);
diff -Nru libhtml-widgets-navmenu-perl-1.0703/examples/article-examples/complex/H-W-NM-complex.pl libhtml-widgets-navmenu-perl-1.0704/examples/article-examples/complex/H-W-NM-complex.pl
--- libhtml-widgets-navmenu-perl-1.0703/examples/article-examples/complex/H-W-NM-complex.pl 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/examples/article-examples/complex/H-W-NM-complex.pl 2019-03-11 20:38:28.000000000 +0000
@@ -35,290 +35,320 @@
}
EOF
-my $nav_menu_tree =
-{
- 'host' => "default",
- 'text' => "HTML-Widgets-NavMenu Example",
+my $nav_menu_tree = {
+ 'host' => "default",
+ 'text' => "HTML-Widgets-NavMenu Example",
'title' => "HTML-Widgets-NavMenu",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Home",
- 'url' => "",
+ 'url' => "",
},
{
'text' => "About Myself",
- 'url' => "me/",
- 'subs' =>
- [
+ 'url' => "me/",
+ 'subs' => [
{
- 'text' => "Bio",
- 'url' => "personal.html",
+ 'text' => "Bio",
+ 'url' => "personal.html",
'title' => "A Short Biography of Myself",
},
{
- 'text' => "Contact",
- 'url' => "me/contact-me/",
- 'title'=> "How to Contact me in Every Conceivable Way",
+ 'text' => "Contact",
+ 'url' => "me/contact-me/",
+ 'title' => "How to Contact me in Every Conceivable Way",
},
{
'text' => "My Resumés",
- 'url' => "me/resumes/",
- 'subs' =>
- [
+ 'url' => "me/resumes/",
+ 'subs' => [
{
'text' => "English Resumé",
- 'url' => "resume.html",
+ 'url' => "resume.html",
},
{
'text' => "Detailed English Resumé",
- 'url' => "resume_detailed.html",
+ 'url' => "resume_detailed.html",
},
],
},
],
},
{
- 'text' => "Humour",
- 'url' => "humour/",
+ 'text' => "Humour",
+ 'url' => "humour/",
'title' => "My Humorous Creations",
- 'subs' =>
- [
+ 'subs' => [
{
- 'text' => "The Enemy",
- 'url' => "humour/TheEnemy/",
+ 'text' => "The Enemy",
+ 'url' => "humour/TheEnemy/",
'title' => "The Enemy and How I Helped to Fight It",
},
{
- 'text' => "TOWTF",
- 'url' => "humour/TOWTF/",
+ 'text' => "TOWTF",
+ 'url' => "humour/TOWTF/",
'title' => "The One with the Fountainhead",
},
{
- 'text' => "The Pope",
- 'url' => "humour/Pope/",
+ 'text' => "The Pope",
+ 'url' => "humour/Pope/",
'title' => "The Pope Died on Sunday",
},
{
- 'text' => "Humour Archive",
+ 'text' => "Humour Archive",
'title' => "Archive of Humorous Bits I came up with",
- 'url' => "humour.html",
+ 'url' => "humour.html",
},
{
'text' => "Fortune Cookies Collection",
- 'title' => "Collection of Files for Input to the UNIX 'fortune' Program",
+ 'title' =>
+"Collection of Files for Input to the UNIX 'fortune' Program",
'url' => "humour/fortunes/",
},
],
},
{
- 'text' => "Math-Ventures",
- 'url' => "MathVentures/",
+ 'text' => "Math-Ventures",
+ 'url' => "MathVentures/",
'title' => "Mathematical Riddles and their Solutions",
},
{
- 'text' => "Computer Art",
- 'url' => "art/",
+ 'text' => "Computer Art",
+ 'url' => "art/",
'title' => "Computer art I created while explaining how.",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Back to my Homepage",
- 'url' => "art/bk2hp/",
- 'title' => "A Back to my Homepage logo not unlike the one from the movie "Back to the Future"",
+ 'url' => "art/bk2hp/",
+ 'title' =>
+"A Back to my Homepage logo not unlike the one from the movie "Back to the Future"",
},
{
'text' => "Linux Banner",
- 'url' => "art/linux_banner/",
- 'title' => "Linux - Because Software Problems should not Cost Money",
+ 'url' => "art/linux_banner/",
+ 'title' =>
+"Linux - Because Software Problems should not Cost Money",
},
],
},
{
- 'text' => "Software",
- 'url' => "open-source/",
+ 'text' => "Software",
+ 'url' => "open-source/",
'title' => "Pages related to Software (mostly Open-Source)",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Freecell Solver",
- 'url' => "open-source/projects/freecell-solver/",
+ 'url' => "open-source/projects/freecell-solver/",
},
{
'text' => "MikMod for Java",
- 'title' => "A Player for MOD Files (a type of Music Files) for the Java Environment",
+ 'title' =>
+"A Player for MOD Files (a type of Music Files) for the Java Environment",
'url' => "jmikmod/",
},
{
- 'text' => "FCFS RWLock",
+ 'text' => "FCFS RWLock",
'title' => "A First-Come First-Served Readers/Writers Lock",
- 'url' => "rwlock/",
+ 'url' => "rwlock/",
},
{
- 'text' => "Quad-Pres",
+ 'text' => "Quad-Pres",
'title' => "A Tool for Creating HTML Presentations",
- 'url' => "open-source/projects/quad-pres/",
+ 'url' => "open-source/projects/quad-pres/",
},
{
- 'text' => "Favourite OSS",
+ 'text' => "Favourite OSS",
'title' => "Favourite Open-Source Software",
- 'url' => "open-source/favourite/",
+ 'url' => "open-source/favourite/",
},
{
- 'text' => "Interviews",
+ 'text' => "Interviews",
'title' => "Interviews with Open-Source People",
- 'url' => "open-source/interviews/",
+ 'url' => "open-source/interviews/",
},
{
'text' => "Contributions",
- 'title' => "Contributions to Other Projects, that I did not Start",
+ 'title' =>
+ "Contributions to Other Projects, that I did not Start",
'url' => "open-source/contributions/",
},
{
- 'text' => "Bits and Bobs",
+ 'text' => "Bits and Bobs",
'title' => "Various Small-Scale Open-Source Works",
- 'url' => "open-source/bits.html",
+ 'url' => "open-source/bits.html",
},
{
- 'text' => "Portability Libraries",
+ 'text' => "Portability Libraries",
'title' => "Cross-Platform Abstraction Libraries",
- 'url' => "abstraction/",
+ 'url' => "abstraction/",
},
{
- 'text' => "Software Tools",
+ 'text' => "Software Tools",
'title' => "Software Construction and Management Tools",
- 'url' => "software-tools/",
+ 'url' => "software-tools/",
},
],
},
{
- 'text' => "Lectures",
- 'url' => "lecture/",
+ 'text' => "Lectures",
+ 'url' => "lecture/",
'title' => "Presentations I Wrote (Mostly Technical)",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Perl for Newbies",
- 'url' => "lecture/Perl/Newbies/",
+ 'url' => "lecture/Perl/Newbies/",
},
{
'text' => "Freecell Solver",
- 'url' => "lecture/Freecell-Solver/",
+ 'url' => "lecture/Freecell-Solver/",
},
{
'text' => "Lambda Calculus",
- 'title' => "A presentation about a Turing-complete programming environment with only two primitives",
+ 'title' =>
+"A presentation about a Turing-complete programming environment with only two primitives",
'url' => "lecture/lc/",
},
{
'text' => "The Gimp",
- 'title' => "A Presentation about the GNU Image Manipulation Program",
+ 'title' =>
+"A Presentation about the GNU Image Manipulation Program",
'url' => "lecture/Gimp/",
},
{
'text' => "GNU Autotools",
- 'url' => "lecture/Autotools/",
+ 'url' => "lecture/Autotools/",
},
{
- 'text' => "Web Meta Lecture",
+ 'text' => "Web Meta Lecture",
'title' => "A Presentation about the Web Meta Language",
- 'url' => "lecture/WebMetaLecture/",
+ 'url' => "lecture/WebMetaLecture/",
},
],
},
{
'text' => "Essays",
- 'url' => "essays/",
- 'title' => "Various Essays and Articles about Technology and Philosophy in General",
- 'subs' =>
- [
+ 'url' => "essays/",
+ 'title' =>
+"Various Essays and Articles about Technology and Philosophy in General",
+ 'subs' => [
{
- 'text' => "Index to Essays",
- 'url' => "essays/Index/",
+ 'text' => "Index to Essays",
+ 'url' => "essays/Index/",
'title' => "Index to Essays and Articles I wrote.",
},
{
- 'text' => "Open Source",
- 'url' => "essays/open-source/",
+ 'text' => "Open Source",
+ 'url' => "essays/open-source/",
'title' => "Essays about Open-Source",
},
{
- 'text' => "Life",
- 'url' => "essays/life/",
+ 'text' => "Life",
+ 'url' => "essays/life/",
'title' => "Essays about Life, the Universe and Everything",
},
],
},
{
- 'text' => "Cool Links",
- 'url' => "links.html",
+ 'text' => "Cool Links",
+ 'url' => "links.html",
'title' => "An incomplete list of links I find cool and/or useful.",
},
],
};
-my %hosts =
-(
- 'hosts' =>
- {
- 'default' =>
- {
- 'base_url' => ("http://web-cpan.berlios.de/modules/" .
- "HTML-Widgets-NavMenu/article/examples/simple/dest/"),
+my %hosts = (
+ 'hosts' => {
+ 'default' => {
+ 'base_url' => (
+ "http://web-cpan.berlios.de/modules/"
+ . "HTML-Widgets-NavMenu/article/examples/simple/dest/"
+ ),
},
},
);
-my @page_paths =
-("", "me/", "personal.html", "me/contact-me/", "me/resumes/", "resume.html",
-"resume_detailed.html", "humour/", "humour/TheEnemy/", "humour/TOWTF/",
-"humour/Pope/", "humour.html", "humour/fortunes/", "MathVentures/",
-"art/", "art/bk2hp/", "art/linux_banner/", "open-source/",
-"open-source/projects/freecell-solver/", "jmikmod/", "rwlock/",
-"open-source/projects/quad-pres/", "open-source/favourite/",
-"open-source/interviews/", "open-source/contributions/",
-"open-source/bits.html", "abstraction/", "software-tools/", "lecture/",
-"lecture/Perl/Newbies/", "lecture/Freecell-Solver/", "lecture/lc/",
-"lecture/Gimp/", "lecture/Autotools/", "lecture/WebMetaLecture/",
-"essays/", "essays/Index/", "essays/open-source/", "essays/life/",
-"links.html");
-
+my @page_paths = (
+ "",
+ "me/",
+ "personal.html",
+ "me/contact-me/",
+ "me/resumes/",
+ "resume.html",
+ "resume_detailed.html",
+ "humour/",
+ "humour/TheEnemy/",
+ "humour/TOWTF/",
+ "humour/Pope/",
+ "humour.html",
+ "humour/fortunes/",
+ "MathVentures/",
+ "art/",
+ "art/bk2hp/",
+ "art/linux_banner/",
+ "open-source/",
+ "open-source/projects/freecell-solver/",
+ "jmikmod/",
+ "rwlock/",
+ "open-source/projects/quad-pres/",
+ "open-source/favourite/",
+ "open-source/interviews/",
+ "open-source/contributions/",
+ "open-source/bits.html",
+ "abstraction/",
+ "software-tools/",
+ "lecture/",
+ "lecture/Perl/Newbies/",
+ "lecture/Freecell-Solver/",
+ "lecture/lc/",
+ "lecture/Gimp/",
+ "lecture/Autotools/",
+ "lecture/WebMetaLecture/",
+ "essays/",
+ "essays/Index/",
+ "essays/open-source/",
+ "essays/life/",
+ "links.html"
+);
-my @pages =
- (map {
- +{ 'path' => $_, 'title' => "Title for $_",
- 'content' => "
Content for $_
" }
- } @page_paths);
+my @pages = (
+ map {
+ +{
+ 'path' => $_,
+ 'title' => "Title for $_",
+ 'content' => "
Content for $_
"
+ }
+ } @page_paths
+);
foreach my $page (@pages)
{
- my $path = $page->{'path'};
- my $title = $page->{'title'};
- my $content = $page->{'content'};
- my $nav_menu =
- HTML::Widgets::NavMenu->new(
- path_info => "/$path",
- current_host => "default",
- hosts => \%hosts,
- tree_contents => $nav_menu_tree,
- );
+ my $path = $page->{'path'};
+ my $title = $page->{'title'};
+ my $content = $page->{'content'};
+ my $nav_menu = HTML::Widgets::NavMenu->new(
+ path_info => "/$path",
+ current_host => "default",
+ hosts => \%hosts,
+ tree_contents => $nav_menu_tree,
+ );
my $nav_menu_results = $nav_menu->render();
- my $nav_menu_text = join("\n", @{$nav_menu_results->{'html'}});
+ my $nav_menu_text = join( "\n", @{ $nav_menu_results->{'html'} } );
my $file_path = $path;
- if (($file_path =~ m{/$}) || ($file_path eq ""))
+ if ( ( $file_path =~ m{/$} ) || ( $file_path eq "" ) )
{
$file_path .= "index.html";
}
my $full_path = "dest/$file_path";
$full_path =~ m{^(.*)/[^/]+$};
+
# mkpath() throws an exception if it isn't successful, which will cause
# this program to terminate. This is what we want.
- mkpath($1, 0, 0755);
- open my $out, ">", $full_path or
- die "Could not open \"$full_path\" for writing!";
+ mkpath( $1, 0, 0755 );
+ open my $out, ">", $full_path
+ or die "Could not open \"$full_path\" for writing!";
print {$out} <<"EOF";
diff -Nru libhtml-widgets-navmenu-perl-1.0703/examples/article-examples/fine-grained-site-flow/H-W-NM-fine-grained-site-flow.pl libhtml-widgets-navmenu-perl-1.0704/examples/article-examples/fine-grained-site-flow/H-W-NM-fine-grained-site-flow.pl
--- libhtml-widgets-navmenu-perl-1.0703/examples/article-examples/fine-grained-site-flow/H-W-NM-fine-grained-site-flow.pl 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/examples/article-examples/fine-grained-site-flow/H-W-NM-fine-grained-site-flow.pl 2019-03-11 20:38:28.000000000 +0000
@@ -79,45 +79,41 @@
}
EOF
-my $nav_menu_tree =
-{
- 'host' => "default",
- 'text' => "HTML-Widgets-NavMenu Example",
+my $nav_menu_tree = {
+ 'host' => "default",
+ 'text' => "HTML-Widgets-NavMenu Example",
'title' => "HTML-Widgets-NavMenu",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Home",
- 'url' => "",
+ 'url' => "",
},
{
'text' => "About Myself",
- 'url' => "me/",
- 'subs' =>
- [
+ 'url' => "me/",
+ 'subs' => [
{
- 'text' => "Bio",
- 'url' => "personal.html",
+ 'text' => "Bio",
+ 'url' => "personal.html",
'title' => "A Short Biography of Myself",
},
{
- 'text' => "Contact",
- 'url' => "me/contact-me/",
- 'title'=> "How to Contact me in Every Conceivable Way",
+ 'text' => "Contact",
+ 'url' => "me/contact-me/",
+ 'title' => "How to Contact me in Every Conceivable Way",
},
{
'text' => "My Resumés",
- 'url' => "me/resumes/",
- 'subs' =>
- [
+ 'url' => "me/resumes/",
+ 'subs' => [
{
'text' => "English Resumé",
- 'url' => "resume.html",
+ 'url' => "resume.html",
'skip' => 1,
},
{
'text' => "Detailed English Resumé",
- 'url' => "resume_detailed.html",
+ 'url' => "resume_detailed.html",
'skip' => 1,
},
],
@@ -125,300 +121,333 @@
],
},
{
- 'text' => "Humour",
- 'url' => "humour/",
- 'title' => "My Humorous Creations",
+ 'text' => "Humour",
+ 'url' => "humour/",
+ 'title' => "My Humorous Creations",
'show_always' => 1,
- 'subs' =>
- [
+ 'subs' => [
{
- 'text' => "The Enemy",
- 'url' => "humour/TheEnemy/",
+ 'text' => "The Enemy",
+ 'url' => "humour/TheEnemy/",
'title' => "The Enemy and How I Helped to Fight It",
},
{
- 'text' => "TOWTF",
- 'url' => "humour/TOWTF/",
+ 'text' => "TOWTF",
+ 'url' => "humour/TOWTF/",
'title' => "The One with the Fountainhead",
},
{
- 'text' => "The Pope",
- 'url' => "humour/Pope/",
+ 'text' => "The Pope",
+ 'url' => "humour/Pope/",
'title' => "The Pope Died on Sunday",
},
{
- 'text' => "Humour Archive",
+ 'text' => "Humour Archive",
'title' => "Archive of Humorous Bits I came up with",
- 'url' => "humour.html",
+ 'url' => "humour.html",
},
{
'text' => "Fortune Cookies Collection",
- 'title' => "Collection of Files for Input to the UNIX 'fortune' Program",
+ 'title' =>
+"Collection of Files for Input to the UNIX 'fortune' Program",
'url' => "humour/fortunes/",
},
],
},
{
- 'text' => "Math-Ventures",
- 'url' => "MathVentures/",
+ 'text' => "Math-Ventures",
+ 'url' => "MathVentures/",
'title' => "Mathematical Riddles and their Solutions",
},
{
- 'text' => "Computer Art",
- 'url' => "art/",
+ 'text' => "Computer Art",
+ 'url' => "art/",
'title' => "Computer art I created while explaining how.",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Back to my Homepage",
- 'url' => "art/bk2hp/",
- 'title' => "A Back to my Homepage logo not unlike the one from the movie "Back to the Future"",
+ 'url' => "art/bk2hp/",
+ 'title' =>
+"A Back to my Homepage logo not unlike the one from the movie "Back to the Future"",
},
{
'text' => "Linux Banner",
- 'url' => "art/linux_banner/",
- 'title' => "Linux - Because Software Problems should not Cost Money",
+ 'url' => "art/linux_banner/",
+ 'title' =>
+"Linux - Because Software Problems should not Cost Money",
},
],
},
{
- 'text' => "Software",
- 'url' => "open-source/",
+ 'text' => "Software",
+ 'url' => "open-source/",
'expand' => { 're' => "^(open-source|perl)/", },
- 'title' => "Pages related to Software (mostly Open-Source)",
- 'subs' =>
- [
+ 'title' => "Pages related to Software (mostly Open-Source)",
+ 'subs' => [
{
'text' => "Freecell Solver",
- 'url' => "open-source/projects/freecell-solver/",
+ 'url' => "open-source/projects/freecell-solver/",
},
{
'text' => "MikMod for Java",
- 'title' => "A Player for MOD Files (a type of Music Files) for the Java Environment",
+ 'title' =>
+"A Player for MOD Files (a type of Music Files) for the Java Environment",
'url' => "jmikmod/",
},
{
- 'text' => "FCFS RWLock",
+ 'text' => "FCFS RWLock",
'title' => "A First-Come First-Served Readers/Writers Lock",
- 'url' => "rwlock/",
+ 'url' => "rwlock/",
},
{
- 'text' => "Quad-Pres",
+ 'text' => "Quad-Pres",
'title' => "A Tool for Creating HTML Presentations",
- 'url' => "open-source/projects/quad-pres/",
+ 'url' => "open-source/projects/quad-pres/",
},
{
- 'text' => "Favourite OSS",
+ 'text' => "Favourite OSS",
'title' => "Favourite Open-Source Software",
- 'url' => "open-source/favourite/",
+ 'url' => "open-source/favourite/",
},
{
- 'text' => "Interviews",
+ 'text' => "Interviews",
'title' => "Interviews with Open-Source People",
- 'url' => "open-source/interviews/",
+ 'url' => "open-source/interviews/",
},
{
'text' => "Contributions",
- 'title' => "Contributions to Other Projects, that I did not Start",
+ 'title' =>
+ "Contributions to Other Projects, that I did not Start",
'url' => "open-source/contributions/",
},
{
- 'text' => "Bits and Bobs",
+ 'text' => "Bits and Bobs",
'title' => "Various Small-Scale Open-Source Works",
- 'url' => "open-source/bits.html",
+ 'url' => "open-source/bits.html",
},
{
- 'text' => "Portability Libraries",
+ 'text' => "Portability Libraries",
'title' => "Cross-Platform Abstraction Libraries",
- 'url' => "abstraction/",
- 'hide' => 1,
+ 'url' => "abstraction/",
+ 'hide' => 1,
},
{
- 'text' => "Software Tools",
+ 'text' => "Software Tools",
'title' => "Software Construction and Management Tools",
- 'url' => "software-tools/",
- 'hide' => 1,
+ 'url' => "software-tools/",
+ 'hide' => 1,
},
],
},
{
- 'text' => "Lectures",
- 'url' => "lecture/",
+ 'text' => "Lectures",
+ 'url' => "lecture/",
'expand' => { 're' => "^lecture/", },
- 'title' => "Presentations I Wrote (Mostly Technical)",
- 'subs' =>
- [
+ 'title' => "Presentations I Wrote (Mostly Technical)",
+ 'subs' => [
{
'text' => "Perl for Newbies",
- 'url' => "lecture/Perl/Newbies/",
+ 'url' => "lecture/Perl/Newbies/",
},
{
'text' => "Freecell Solver",
- 'url' => "lecture/Freecell-Solver/",
+ 'url' => "lecture/Freecell-Solver/",
},
{
'text' => "Lambda Calculus",
- 'title' => "A presentation about a Turing-complete programming environment with only two primitives",
+ 'title' =>
+"A presentation about a Turing-complete programming environment with only two primitives",
'url' => "lecture/lc/",
},
{
'text' => "The Gimp",
- 'title' => "A Presentation about the GNU Image Manipulation Program",
+ 'title' =>
+"A Presentation about the GNU Image Manipulation Program",
'url' => "lecture/Gimp/",
},
{
'text' => "GNU Autotools",
- 'url' => "lecture/Autotools/",
+ 'url' => "lecture/Autotools/",
},
{
- 'text' => "Web Meta Lecture",
+ 'text' => "Web Meta Lecture",
'title' => "A Presentation about the Web Meta Language",
- 'url' => "lecture/WebMetaLecture/",
+ 'url' => "lecture/WebMetaLecture/",
},
],
},
{
'text' => "Essays",
- 'url' => "essays/",
- 'title' => "Various Essays and Articles about Technology and Philosophy in General",
- 'subs' =>
- [
+ 'url' => "essays/",
+ 'title' =>
+"Various Essays and Articles about Technology and Philosophy in General",
+ 'subs' => [
{
- 'text' => "Index to Essays",
- 'url' => "essays/Index/",
+ 'text' => "Index to Essays",
+ 'url' => "essays/Index/",
'title' => "Index to Essays and Articles I wrote.",
},
{
- 'text' => "Open Source",
- 'url' => "essays/open-source/",
+ 'text' => "Open Source",
+ 'url' => "essays/open-source/",
'title' => "Essays about Open-Source",
},
{
- 'text' => "Life",
- 'url' => "essays/life/",
+ 'text' => "Life",
+ 'url' => "essays/life/",
'title' => "Essays about Life, the Universe and Everything",
},
],
},
{
- 'text' => "Cool Links",
- 'url' => "links.html",
+ 'text' => "Cool Links",
+ 'url' => "links.html",
'title' => "An incomplete list of links I find cool and/or useful.",
},
{
- 'text' => "Site Map",
- 'url' => "site-map/",
+ 'text' => "Site Map",
+ 'url' => "site-map/",
'title' => "A site map for the site with all the pages",
},
],
};
-my %hosts =
-(
- 'hosts' =>
- {
- 'default' =>
- {
- 'base_url' => ("http://web-cpan.berlios.de/modules/" .
- "HTML-Widgets-NavMenu/article/examples/simple/dest/"),
+my %hosts = (
+ 'hosts' => {
+ 'default' => {
+ 'base_url' => (
+ "http://web-cpan.berlios.de/modules/"
+ . "HTML-Widgets-NavMenu/article/examples/simple/dest/"
+ ),
},
},
);
-my @page_paths =
-("", "me/", "personal.html", "me/contact-me/", "me/resumes/", "resume.html",
-"resume_detailed.html", "humour/", "humour/TheEnemy/", "humour/TOWTF/",
-"humour/Pope/", "humour.html", "humour/fortunes/", "MathVentures/",
-"art/", "art/bk2hp/", "art/linux_banner/", "open-source/",
-"open-source/projects/freecell-solver/", "jmikmod/", "rwlock/",
-"open-source/projects/quad-pres/", "open-source/favourite/",
-"open-source/interviews/", "open-source/contributions/",
-"open-source/bits.html", "abstraction/", "software-tools/", "lecture/",
-"lecture/Perl/Newbies/", "lecture/Freecell-Solver/", "lecture/lc/",
-"lecture/Gimp/", "lecture/Autotools/", "lecture/WebMetaLecture/",
-"essays/", "essays/Index/", "essays/open-source/", "essays/life/",
-"links.html");
-
-my @pages =
- (map {
- +{ 'path' => $_, 'title' => "Title for $_",
- 'content' => "
Content for $_
" }
- } @page_paths);
+my @page_paths = (
+ "",
+ "me/",
+ "personal.html",
+ "me/contact-me/",
+ "me/resumes/",
+ "resume.html",
+ "resume_detailed.html",
+ "humour/",
+ "humour/TheEnemy/",
+ "humour/TOWTF/",
+ "humour/Pope/",
+ "humour.html",
+ "humour/fortunes/",
+ "MathVentures/",
+ "art/",
+ "art/bk2hp/",
+ "art/linux_banner/",
+ "open-source/",
+ "open-source/projects/freecell-solver/",
+ "jmikmod/",
+ "rwlock/",
+ "open-source/projects/quad-pres/",
+ "open-source/favourite/",
+ "open-source/interviews/",
+ "open-source/contributions/",
+ "open-source/bits.html",
+ "abstraction/",
+ "software-tools/",
+ "lecture/",
+ "lecture/Perl/Newbies/",
+ "lecture/Freecell-Solver/",
+ "lecture/lc/",
+ "lecture/Gimp/",
+ "lecture/Autotools/",
+ "lecture/WebMetaLecture/",
+ "essays/",
+ "essays/Index/",
+ "essays/open-source/",
+ "essays/life/",
+ "links.html"
+);
+
+my @pages = (
+ map {
+ +{
+ 'path' => $_,
+ 'title' => "Title for $_",
+ 'content' => "
Content for $_
"
+ }
+ } @page_paths
+);
# Add the site-map page.
{
- my $site_map_path = "site-map/";
- my $site_map_generator =
- HTML::Widgets::NavMenu->new(
- path_info => "/$site_map_path",
- current_host => "default",
- hosts => \%hosts,
- tree_contents => $nav_menu_tree
- );
+ my $site_map_path = "site-map/";
+ my $site_map_generator = HTML::Widgets::NavMenu->new(
+ path_info => "/$site_map_path",
+ current_host => "default",
+ hosts => \%hosts,
+ tree_contents => $nav_menu_tree
+ );
push @pages,
- {
- 'path' => $site_map_path,
- 'title' => "Site Map",
- 'content' => join("\n", @{$site_map_generator->gen_site_map()}),
- };
+ {
+ 'path' => $site_map_path,
+ 'title' => "Site Map",
+ 'content' => join( "\n", @{ $site_map_generator->gen_site_map() } ),
+ };
};
push @pages,
-(
+ (
{
- 'path' => "perl/japhs/",
- 'title' => "Perl JAPHs",
+ 'path' => "perl/japhs/",
+ 'title' => "Perl JAPHs",
'content' => "
JAPHs for fun and profit.
",
},
{
- 'path' => "open-source/yowza/",
- 'title' => "A Wonderful Yowza",
+ 'path' => "open-source/yowza/",
+ 'title' => "A Wonderful Yowza",
'content' => "
Yowza is da-bomb man!
",
}
-);
+ );
foreach my $page (@pages)
{
- my $path = $page->{'path'};
- my $nav_menu =
- HTML::Widgets::NavMenu->new(
- path_info => "/$path",
- current_host => "default",
- hosts => \%hosts,
- tree_contents => $nav_menu_tree,
- );
+ my $path = $page->{'path'};
+ my $nav_menu = HTML::Widgets::NavMenu->new(
+ path_info => "/$path",
+ current_host => "default",
+ hosts => \%hosts,
+ tree_contents => $nav_menu_tree,
+ );
my $nav_menu_results = $nav_menu->render();
my $file_path = $path;
- if (($file_path =~ m{/$}) || ($file_path eq ""))
+ if ( ( $file_path =~ m{/$} ) || ( $file_path eq "" ) )
{
$file_path .= "index.html";
}
my $full_path = "dest/$file_path";
$full_path =~ m{^(.*)/[^/]+$};
+
# mkpath() throws an exception if it isn't successful, which will cause
# this program to terminate. This is what we want.
- mkpath($1, 0, 0755);
- open my $out, ">", $full_path or
- die "Could not open \"$full_path\" for writing!";
+ mkpath( $1, 0, 0755 );
+ open my $out, ">", $full_path
+ or die "Could not open \"$full_path\" for writing!";
- my $template =
- Template->new(
+ my $template = Template->new(
{
'POST_CHOMP' => 1,
}
- );
+ );
- my $vars =
- {
- 'title' => $page->{'title'},
- 'css_style' => $css_style,
- 'nav_menu_text' => join("\n", @{$nav_menu_results->{'html'}}) . "\n",
- 'content' => $page->{'content'} . "\n",
+ my $vars = {
+ 'title' => $page->{'title'},
+ 'css_style' => $css_style,
+ 'nav_menu_text' => join( "\n", @{ $nav_menu_results->{'html'} } )
+ . "\n",
+ 'content' => $page->{'content'} . "\n",
'breadcrumbs' => $nav_menu_results->{leading_path},
- 'nav_links' => $nav_menu_results->{'nav_links_obj'},
+ 'nav_links' => $nav_menu_results->{'nav_links_obj'},
};
my $nav_links_template = <<'EOF';
@@ -442,7 +471,7 @@
[% FOREACH c = breadcrumbs %]
-[% UNLESS loop.first %] → [% END %]
+[% UNLESS loop.first %] → [% END %]
[% c.label %]
@@ -466,7 +495,7 @@
EOF
- $template->process(\$nav_links_template, $vars, $out);
+ $template->process( \$nav_links_template, $vars, $out );
close($out);
}
diff -Nru libhtml-widgets-navmenu-perl-1.0703/examples/article-examples/simple/H-W-NM-simple.pl libhtml-widgets-navmenu-perl-1.0704/examples/article-examples/simple/H-W-NM-simple.pl
--- libhtml-widgets-navmenu-perl-1.0703/examples/article-examples/simple/H-W-NM-simple.pl 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/examples/article-examples/simple/H-W-NM-simple.pl 2019-03-11 20:38:28.000000000 +0000
@@ -35,47 +35,43 @@
}
EOF
-my $nav_menu_tree =
-{
- 'host' => "default",
- 'text' => "Top 1",
+my $nav_menu_tree = {
+ 'host' => "default",
+ 'text' => "Top 1",
'title' => "T1 Title",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Home",
- 'url' => "",
+ 'url' => "",
},
{
- 'text' => "About Me",
+ 'text' => "About Me",
'title' => "About Myself",
- 'url' => "me/",
+ 'url' => "me/",
},
{
- 'text' => "Links",
+ 'text' => "Links",
'title' => "Hyperlinks to other Pages",
- 'url' => "links/",
+ 'url' => "links/",
},
],
};
-my %hosts =
-(
- 'hosts' =>
- {
- 'default' =>
- {
- 'base_url' => ("http://web-cpan.berlios.de/modules/" .
- "HTML-Widgets-NavMenu/article/examples/simple/dest/"),
+my %hosts = (
+ 'hosts' => {
+ 'default' => {
+ 'base_url' => (
+ "http://web-cpan.berlios.de/modules/"
+ . "HTML-Widgets-NavMenu/article/examples/simple/dest/"
+ ),
},
},
);
-my @pages =
-(
+my @pages = (
{
- 'path' => "",
- 'title' => "John Doe's Homepage",
+ 'path' => "",
+ 'title' => "John Doe's Homepage",
'content' => <<'EOF',
Hi! This is the homepage of John Doe. I hope you enjoy your stay here.
@@ -83,8 +79,8 @@
EOF
},
{
- 'path' => "me/",
- 'title' => "About Myself",
+ 'path' => "me/",
+ 'title' => "About Myself",
'content' => <<'EOF',
My name is John Doe and I've been exploring the art and science of creating
@@ -94,8 +90,8 @@
EOF
},
{
- 'path' => "links/",
- 'title' => "Cool Links",
+ 'path' => "links/",
+ 'title' => "Cool Links",
'content' => <<'EOF',
Perl-Related Links
@@ -117,33 +113,33 @@
foreach my $page (@pages)
{
- my $path = $page->{'path'};
- my $title = $page->{'title'};
- my $content = $page->{'content'};
- my $nav_menu =
- HTML::Widgets::NavMenu->new(
- path_info => "/$path",
- current_host => "default",
- hosts => \%hosts,
- tree_contents => $nav_menu_tree,
- );
+ my $path = $page->{'path'};
+ my $title = $page->{'title'};
+ my $content = $page->{'content'};
+ my $nav_menu = HTML::Widgets::NavMenu->new(
+ path_info => "/$path",
+ current_host => "default",
+ hosts => \%hosts,
+ tree_contents => $nav_menu_tree,
+ );
my $nav_menu_results = $nav_menu->render();
- my $nav_menu_text = join("\n", @{$nav_menu_results->{'html'}});
+ my $nav_menu_text = join( "\n", @{ $nav_menu_results->{'html'} } );
my $file_path = $path;
- if (($file_path =~ m{/$}) || ($file_path eq ""))
+ if ( ( $file_path =~ m{/$} ) || ( $file_path eq "" ) )
{
$file_path .= "index.html";
}
my $full_path = "dest/$file_path";
$full_path =~ m{^(.*)/[^/]+$};
+
# mkpath() throws an exception if it isn't successful, which will cause
# this program to terminate. This is what we want.
- mkpath($1, 0, 0755);
- open my $out, ">", $full_path or
- die "Could not open \"$full_path\" for writing!";
+ mkpath( $1, 0, 0755 );
+ open my $out, ">", $full_path
+ or die "Could not open \"$full_path\" for writing!";
print {$out} <<"EOF";
diff -Nru libhtml-widgets-navmenu-perl-1.0703/examples/article-examples/with-embellishments/H-W-NM-embellish.pl libhtml-widgets-navmenu-perl-1.0704/examples/article-examples/with-embellishments/H-W-NM-embellish.pl
--- libhtml-widgets-navmenu-perl-1.0703/examples/article-examples/with-embellishments/H-W-NM-embellish.pl 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/examples/article-examples/with-embellishments/H-W-NM-embellish.pl 2019-03-11 20:38:28.000000000 +0000
@@ -79,326 +79,354 @@
}
EOF
-my $nav_menu_tree =
-{
- 'host' => "default",
- 'text' => "HTML-Widgets-NavMenu Example",
+my $nav_menu_tree = {
+ 'host' => "default",
+ 'text' => "HTML-Widgets-NavMenu Example",
'title' => "HTML-Widgets-NavMenu",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Home",
- 'url' => "",
+ 'url' => "",
},
{
'text' => "About Myself",
- 'url' => "me/",
- 'subs' =>
- [
+ 'url' => "me/",
+ 'subs' => [
{
- 'text' => "Bio",
- 'url' => "personal.html",
+ 'text' => "Bio",
+ 'url' => "personal.html",
'title' => "A Short Biography of Myself",
},
{
- 'text' => "Contact",
- 'url' => "me/contact-me/",
- 'title'=> "How to Contact me in Every Conceivable Way",
+ 'text' => "Contact",
+ 'url' => "me/contact-me/",
+ 'title' => "How to Contact me in Every Conceivable Way",
},
{
'text' => "My Resumés",
- 'url' => "me/resumes/",
- 'subs' =>
- [
+ 'url' => "me/resumes/",
+ 'subs' => [
{
'text' => "English Resumé",
- 'url' => "resume.html",
+ 'url' => "resume.html",
},
{
'text' => "Detailed English Resumé",
- 'url' => "resume_detailed.html",
+ 'url' => "resume_detailed.html",
},
],
},
],
},
{
- 'text' => "Humour",
- 'url' => "humour/",
+ 'text' => "Humour",
+ 'url' => "humour/",
'title' => "My Humorous Creations",
- 'subs' =>
- [
+ 'subs' => [
{
- 'text' => "The Enemy",
- 'url' => "humour/TheEnemy/",
+ 'text' => "The Enemy",
+ 'url' => "humour/TheEnemy/",
'title' => "The Enemy and How I Helped to Fight It",
},
{
- 'text' => "TOWTF",
- 'url' => "humour/TOWTF/",
+ 'text' => "TOWTF",
+ 'url' => "humour/TOWTF/",
'title' => "The One with the Fountainhead",
},
{
- 'text' => "The Pope",
- 'url' => "humour/Pope/",
+ 'text' => "The Pope",
+ 'url' => "humour/Pope/",
'title' => "The Pope Died on Sunday",
},
{
- 'text' => "Humour Archive",
+ 'text' => "Humour Archive",
'title' => "Archive of Humorous Bits I came up with",
- 'url' => "humour.html",
+ 'url' => "humour.html",
},
{
'text' => "Fortune Cookies Collection",
- 'title' => "Collection of Files for Input to the UNIX 'fortune' Program",
+ 'title' =>
+"Collection of Files for Input to the UNIX 'fortune' Program",
'url' => "humour/fortunes/",
},
],
},
{
- 'text' => "Math-Ventures",
- 'url' => "MathVentures/",
+ 'text' => "Math-Ventures",
+ 'url' => "MathVentures/",
'title' => "Mathematical Riddles and their Solutions",
},
{
- 'text' => "Computer Art",
- 'url' => "art/",
+ 'text' => "Computer Art",
+ 'url' => "art/",
'title' => "Computer art I created while explaining how.",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Back to my Homepage",
- 'url' => "art/bk2hp/",
- 'title' => "A Back to my Homepage logo not unlike the one from the movie "Back to the Future"",
+ 'url' => "art/bk2hp/",
+ 'title' =>
+"A Back to my Homepage logo not unlike the one from the movie "Back to the Future"",
},
{
'text' => "Linux Banner",
- 'url' => "art/linux_banner/",
- 'title' => "Linux - Because Software Problems should not Cost Money",
+ 'url' => "art/linux_banner/",
+ 'title' =>
+"Linux - Because Software Problems should not Cost Money",
},
],
},
{
- 'text' => "Software",
- 'url' => "open-source/",
+ 'text' => "Software",
+ 'url' => "open-source/",
'title' => "Pages related to Software (mostly Open-Source)",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Freecell Solver",
- 'url' => "open-source/projects/freecell-solver/",
+ 'url' => "open-source/projects/freecell-solver/",
},
{
'text' => "MikMod for Java",
- 'title' => "A Player for MOD Files (a type of Music Files) for the Java Environment",
+ 'title' =>
+"A Player for MOD Files (a type of Music Files) for the Java Environment",
'url' => "jmikmod/",
},
{
- 'text' => "FCFS RWLock",
+ 'text' => "FCFS RWLock",
'title' => "A First-Come First-Served Readers/Writers Lock",
- 'url' => "rwlock/",
+ 'url' => "rwlock/",
},
{
- 'text' => "Quad-Pres",
+ 'text' => "Quad-Pres",
'title' => "A Tool for Creating HTML Presentations",
- 'url' => "open-source/projects/quad-pres/",
+ 'url' => "open-source/projects/quad-pres/",
},
{
- 'text' => "Favourite OSS",
+ 'text' => "Favourite OSS",
'title' => "Favourite Open-Source Software",
- 'url' => "open-source/favourite/",
+ 'url' => "open-source/favourite/",
},
{
- 'text' => "Interviews",
+ 'text' => "Interviews",
'title' => "Interviews with Open-Source People",
- 'url' => "open-source/interviews/",
+ 'url' => "open-source/interviews/",
},
{
'text' => "Contributions",
- 'title' => "Contributions to Other Projects, that I did not Start",
+ 'title' =>
+ "Contributions to Other Projects, that I did not Start",
'url' => "open-source/contributions/",
},
{
- 'text' => "Bits and Bobs",
+ 'text' => "Bits and Bobs",
'title' => "Various Small-Scale Open-Source Works",
- 'url' => "open-source/bits.html",
+ 'url' => "open-source/bits.html",
},
{
- 'text' => "Portability Libraries",
+ 'text' => "Portability Libraries",
'title' => "Cross-Platform Abstraction Libraries",
- 'url' => "abstraction/",
+ 'url' => "abstraction/",
},
{
- 'text' => "Software Tools",
+ 'text' => "Software Tools",
'title' => "Software Construction and Management Tools",
- 'url' => "software-tools/",
+ 'url' => "software-tools/",
},
],
},
{
- 'text' => "Lectures",
- 'url' => "lecture/",
+ 'text' => "Lectures",
+ 'url' => "lecture/",
'title' => "Presentations I Wrote (Mostly Technical)",
- 'subs' =>
- [
+ 'subs' => [
{
'text' => "Perl for Newbies",
- 'url' => "lecture/Perl/Newbies/",
+ 'url' => "lecture/Perl/Newbies/",
},
{
'text' => "Freecell Solver",
- 'url' => "lecture/Freecell-Solver/",
+ 'url' => "lecture/Freecell-Solver/",
},
{
'text' => "Lambda Calculus",
- 'title' => "A presentation about a Turing-complete programming environment with only two primitives",
+ 'title' =>
+"A presentation about a Turing-complete programming environment with only two primitives",
'url' => "lecture/lc/",
},
{
'text' => "The Gimp",
- 'title' => "A Presentation about the GNU Image Manipulation Program",
+ 'title' =>
+"A Presentation about the GNU Image Manipulation Program",
'url' => "lecture/Gimp/",
},
{
'text' => "GNU Autotools",
- 'url' => "lecture/Autotools/",
+ 'url' => "lecture/Autotools/",
},
{
- 'text' => "Web Meta Lecture",
+ 'text' => "Web Meta Lecture",
'title' => "A Presentation about the Web Meta Language",
- 'url' => "lecture/WebMetaLecture/",
+ 'url' => "lecture/WebMetaLecture/",
},
],
},
{
'text' => "Essays",
- 'url' => "essays/",
- 'title' => "Various Essays and Articles about Technology and Philosophy in General",
- 'subs' =>
- [
+ 'url' => "essays/",
+ 'title' =>
+"Various Essays and Articles about Technology and Philosophy in General",
+ 'subs' => [
{
- 'text' => "Index to Essays",
- 'url' => "essays/Index/",
+ 'text' => "Index to Essays",
+ 'url' => "essays/Index/",
'title' => "Index to Essays and Articles I wrote.",
},
{
- 'text' => "Open Source",
- 'url' => "essays/open-source/",
+ 'text' => "Open Source",
+ 'url' => "essays/open-source/",
'title' => "Essays about Open-Source",
},
{
- 'text' => "Life",
- 'url' => "essays/life/",
+ 'text' => "Life",
+ 'url' => "essays/life/",
'title' => "Essays about Life, the Universe and Everything",
},
],
},
{
- 'text' => "Cool Links",
- 'url' => "links.html",
+ 'text' => "Cool Links",
+ 'url' => "links.html",
'title' => "An incomplete list of links I find cool and/or useful.",
},
{
- 'text' => "Site Map",
- 'url' => "site-map/",
+ 'text' => "Site Map",
+ 'url' => "site-map/",
'title' => "A site map for the site with all the pages",
},
],
};
-my %hosts =
-(
- 'hosts' =>
- {
- 'default' =>
- {
- 'base_url' => ("http://web-cpan.berlios.de/modules/" .
- "HTML-Widgets-NavMenu/article/examples/simple/dest/"),
+my %hosts = (
+ 'hosts' => {
+ 'default' => {
+ 'base_url' => (
+ "http://web-cpan.berlios.de/modules/"
+ . "HTML-Widgets-NavMenu/article/examples/simple/dest/"
+ ),
},
},
);
-my @page_paths =
-("", "me/", "personal.html", "me/contact-me/", "me/resumes/", "resume.html",
-"resume_detailed.html", "humour/", "humour/TheEnemy/", "humour/TOWTF/",
-"humour/Pope/", "humour.html", "humour/fortunes/", "MathVentures/",
-"art/", "art/bk2hp/", "art/linux_banner/", "open-source/",
-"open-source/projects/freecell-solver/", "jmikmod/", "rwlock/",
-"open-source/projects/quad-pres/", "open-source/favourite/",
-"open-source/interviews/", "open-source/contributions/",
-"open-source/bits.html", "abstraction/", "software-tools/", "lecture/",
-"lecture/Perl/Newbies/", "lecture/Freecell-Solver/", "lecture/lc/",
-"lecture/Gimp/", "lecture/Autotools/", "lecture/WebMetaLecture/",
-"essays/", "essays/Index/", "essays/open-source/", "essays/life/",
-"links.html");
-
-my @pages =
- (map {
- +{ 'path' => $_, 'title' => "Title for $_",
- 'content' => "
Content for $_
" }
- } @page_paths);
+my @page_paths = (
+ "",
+ "me/",
+ "personal.html",
+ "me/contact-me/",
+ "me/resumes/",
+ "resume.html",
+ "resume_detailed.html",
+ "humour/",
+ "humour/TheEnemy/",
+ "humour/TOWTF/",
+ "humour/Pope/",
+ "humour.html",
+ "humour/fortunes/",
+ "MathVentures/",
+ "art/",
+ "art/bk2hp/",
+ "art/linux_banner/",
+ "open-source/",
+ "open-source/projects/freecell-solver/",
+ "jmikmod/",
+ "rwlock/",
+ "open-source/projects/quad-pres/",
+ "open-source/favourite/",
+ "open-source/interviews/",
+ "open-source/contributions/",
+ "open-source/bits.html",
+ "abstraction/",
+ "software-tools/",
+ "lecture/",
+ "lecture/Perl/Newbies/",
+ "lecture/Freecell-Solver/",
+ "lecture/lc/",
+ "lecture/Gimp/",
+ "lecture/Autotools/",
+ "lecture/WebMetaLecture/",
+ "essays/",
+ "essays/Index/",
+ "essays/open-source/",
+ "essays/life/",
+ "links.html"
+);
+
+my @pages = (
+ map {
+ +{
+ 'path' => $_,
+ 'title' => "Title for $_",
+ 'content' => "
Content for $_
"
+ }
+ } @page_paths
+);
# Add the site-map page.
{
- my $site_map_path = "site-map/";
- my $site_map_generator =
- HTML::Widgets::NavMenu->new(
- path_info => "/$site_map_path",
- current_host => "default",
- hosts => \%hosts,
- tree_contents => $nav_menu_tree
- );
+ my $site_map_path = "site-map/";
+ my $site_map_generator = HTML::Widgets::NavMenu->new(
+ path_info => "/$site_map_path",
+ current_host => "default",
+ hosts => \%hosts,
+ tree_contents => $nav_menu_tree
+ );
push @pages,
- {
- 'path' => $site_map_path,
- 'title' => "Site Map",
- 'content' => join("\n", @{$site_map_generator->gen_site_map()}),
- };
+ {
+ 'path' => $site_map_path,
+ 'title' => "Site Map",
+ 'content' => join( "\n", @{ $site_map_generator->gen_site_map() } ),
+ };
};
foreach my $page (@pages)
{
- my $path = $page->{'path'};
- my $nav_menu =
- HTML::Widgets::NavMenu->new(
- path_info => "/$path",
- current_host => "default",
- hosts => \%hosts,
- tree_contents => $nav_menu_tree,
- );
+ my $path = $page->{'path'};
+ my $nav_menu = HTML::Widgets::NavMenu->new(
+ path_info => "/$path",
+ current_host => "default",
+ hosts => \%hosts,
+ tree_contents => $nav_menu_tree,
+ );
my $nav_menu_results = $nav_menu->render();
my $file_path = $path;
- if (($file_path =~ m{/$}) || ($file_path eq ""))
+ if ( ( $file_path =~ m{/$} ) || ( $file_path eq "" ) )
{
$file_path .= "index.html";
}
my $full_path = "dest/$file_path";
$full_path =~ m{^(.*)/[^/]+$};
+
# mkpath() throws an exception if it isn't successful, which will cause
# this program to terminate. This is what we want.
- mkpath($1, 0, 0755);
- open my $out, ">", $full_path or
- die "Could not open \"$full_path\" for writing!";
-
+ mkpath( $1, 0, 0755 );
+ open my $out, ">", $full_path
+ or die "Could not open \"$full_path\" for writing!";
- my $template =
- Template->new(
+ my $template = Template->new(
{
'POST_CHOMP' => 1,
}
- );
+ );
- my $vars =
- {
- 'title' => $page->{'title'},
- 'css_style' => $css_style,
- 'nav_menu_text' => join("\n", @{$nav_menu_results->{'html'}}) . "\n",
- 'content' => $page->{'content'} . "\n",
+ my $vars = {
+ 'title' => $page->{'title'},
+ 'css_style' => $css_style,
+ 'nav_menu_text' => join( "\n", @{ $nav_menu_results->{'html'} } )
+ . "\n",
+ 'content' => $page->{'content'} . "\n",
'breadcrumbs' => $nav_menu_results->{leading_path},
- 'nav_links' => $nav_menu_results->{'nav_links_obj'},
+ 'nav_links' => $nav_menu_results->{'nav_links_obj'},
};
my $nav_links_template = <<'EOF';
@@ -422,7 +450,7 @@
[% FOREACH c = breadcrumbs %]
-[% UNLESS loop.first %] → [% END %]
+[% UNLESS loop.first %] → [% END %]
[% c.label %]
@@ -446,7 +474,7 @@
EOF
- $template->process(\$nav_links_template, $vars, $out);
+ $template->process( \$nav_links_template, $vars, $out );
close($out);
}
diff -Nru libhtml-widgets-navmenu-perl-1.0703/examples/output.pl libhtml-widgets-navmenu-perl-1.0704/examples/output.pl
--- libhtml-widgets-navmenu-perl-1.0703/examples/output.pl 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/examples/output.pl 2019-03-11 20:38:28.000000000 +0000
@@ -5,41 +5,36 @@
use HTML::Widgets::NavMenu;
-my $nav_menu =
- HTML::Widgets::NavMenu->new(
- 'path_info' => "/me/",
- 'current_host' => "default",
- 'hosts' =>
- {
- 'default' =>
+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' => [
{
- 'base_url' => "http://www.hello.com/"
+ 'value' => "Home",
+ 'url' => "",
},
- },
- 'tree_contents' =>
- {
- 'host' => "default",
- 'value' => "Top 1",
- 'title' => "T1 Title",
- 'expand_re' => "",
- 'subs' =>
- [
- {
- 'value' => "Home",
- 'url' => "",
- },
- {
- 'value' => "About Me",
- 'title' => "About Myself",
- 'url' => "me/",
- },
- ],
- },
- );
+ {
+ 'value' => "About Me",
+ 'title' => "About Myself",
+ 'url' => "me/",
+ },
+ ],
+ },
+);
my $results = $nav_menu->render();
-my $nav_menu_html = join("\n", @{$results->{'html'}});
+my $nav_menu_html = join( "\n", @{ $results->{'html'} } );
print $nav_menu_html;
diff -Nru libhtml-widgets-navmenu-perl-1.0703/inc/Test/Run/Builder.pm libhtml-widgets-navmenu-perl-1.0704/inc/Test/Run/Builder.pm
--- libhtml-widgets-navmenu-perl-1.0703/inc/Test/Run/Builder.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/inc/Test/Run/Builder.pm 2019-03-11 20:38:28.000000000 +0000
@@ -19,29 +19,35 @@
local @INC = @INC;
# Make sure we test the module in blib/
- unshift @INC, (File::Spec->catdir($p->{base_dir}, $self->blib, 'lib'),
- File::Spec->catdir($p->{base_dir}, $self->blib, 'arch'));
+ unshift @INC,
+ (
+ File::Spec->catdir( $p->{base_dir}, $self->blib, 'lib' ),
+ File::Spec->catdir( $p->{base_dir}, $self->blib, 'arch' )
+ );
$self->do_test_run_tests;
}
-sub ACTION_distruntest {
- my ($self) = @_;
+sub ACTION_distruntest
+{
+ my ($self) = @_;
- $self->depends_on('distdir');
+ $self->depends_on('distdir');
- my $start_dir = $self->cwd;
- my $dist_dir = $self->dist_dir;
- chdir $dist_dir or die "Cannot chdir to $dist_dir: $!";
- # XXX could be different names for scripts
-
- $self->run_perl_script('Build.PL') # XXX Should this be run w/ --nouse-rcfile
- or die "Error executing 'Build.PL' in dist directory: $!";
- $self->run_perl_script('Build')
- or die "Error executing 'Build' in dist directory: $!";
- $self->run_perl_script('Build', [], ['runtest'])
- or die "Error executing 'Build test' in dist directory";
- chdir $start_dir;
+ my $start_dir = $self->cwd;
+ my $dist_dir = $self->dist_dir;
+ chdir $dist_dir or die "Cannot chdir to $dist_dir: $!";
+
+ # XXX could be different names for scripts
+
+ $self->run_perl_script(
+ 'Build.PL') # XXX Should this be run w/ --nouse-rcfile
+ or die "Error executing 'Build.PL' in dist directory: $!";
+ $self->run_perl_script('Build')
+ or die "Error executing 'Build' in dist directory: $!";
+ $self->run_perl_script( 'Build', [], ['runtest'] )
+ or die "Error executing 'Build test' in dist directory";
+ chdir $start_dir;
}
sub do_test_run_tests
@@ -50,13 +56,13 @@
require Test::Run::CmdLine::Iface;
- my $test_run =
- Test::Run::CmdLine::Iface->new(
- {
- 'test_files' => [glob("t/*.t")],
- }
- # 'backend_params' => $self->_get_backend_params(),
- );
+ my $test_run = Test::Run::CmdLine::Iface->new(
+ {
+ 'test_files' => [ glob("t/*.t") ],
+ }
+
+ # 'backend_params' => $self->_get_backend_params(),
+ );
return $test_run->run();
}
@@ -64,15 +70,14 @@
sub ACTION_tags
{
my $self = shift;
- return
- $self->do_system(
- "ctags",
- qw(-f tags --recurse --totals
- --exclude=blib/** --exclude=t/lib/**
- --exclude=**/.svn/** --exclude='*~'),
- "--exclude=".$self->dist_name()."-*/**",
- qw(--languages=Perl --langmap=Perl:+.t)
- );
+ return $self->do_system(
+ "ctags",
+ qw(-f tags --recurse --totals
+ --exclude=blib/** --exclude=t/lib/**
+ --exclude=**/.svn/** --exclude='*~'),
+ "--exclude=" . $self->dist_name() . "-*/**",
+ qw(--languages=Perl --langmap=Perl:+.t)
+ );
}
1;
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/EscapeHtml.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/EscapeHtml.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/EscapeHtml.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/EscapeHtml.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,5 +1,5 @@
package HTML::Widgets::NavMenu::EscapeHtml;
-
+$HTML::Widgets::NavMenu::EscapeHtml::VERSION = '1.0704';
use strict;
use warnings;
@@ -7,10 +7,34 @@
use vars qw(@EXPORT);
+
+@EXPORT = (qw(escape_html));
+
+sub escape_html
+{
+ my $string = shift;
+ $string =~ s{&}{&}gso;
+ $string =~ s{<}{<}gso;
+ $string =~ s{>}{>}gso;
+ $string =~ s{"}{"}gso;
+ return $string;
+}
+
+
+1;
+
+__END__
+
+=pod
+
=head1 NAME
HTML::Widgets::NavMenu::EscapeHtml - provides a function to escape HTML.
+=head1 VERSION
+
+version 1.0704
+
=head1 SYNOPSIS
use HTML::Widgets::NavMenu::EscapeHtml;
@@ -21,19 +45,9 @@
Escapes the HTML.
-=cut
+=head1 VERSION
-@EXPORT=(qw(escape_html));
-
-sub escape_html
-{
- my $string = shift;
- $string =~ s{&}{&}gso;
- $string =~ s{<}{<}gso;
- $string =~ s{>}{>}gso;
- $string =~ s{"}{"}gso;
- return $string;
-}
+version 1.0704
=head1 COPYRIGHT & LICENSE
@@ -41,7 +55,132 @@
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::EscapeHtml
+
+=head2 Websites
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/ExpandVal.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/ExpandVal.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/ExpandVal.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/ExpandVal.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,19 +1,17 @@
package HTML::Widgets::NavMenu::ExpandVal;
-
+$HTML::Widgets::NavMenu::ExpandVal::VERSION = '1.0704';
use strict;
use warnings;
use base 'HTML::Widgets::NavMenu::Object';
-__PACKAGE__->mk_acc_ref([
- qw(_capture)],
- );
+__PACKAGE__->mk_acc_ref( [qw(_capture)], );
sub _init
{
- my ($self, $args) = @_;
+ my ( $self, $args ) = @_;
- $self->_capture($args->{'capture'});
+ $self->_capture( $args->{'capture'} );
return 0;
}
@@ -25,17 +23,32 @@
return $self->_capture();
}
+
+1;
+
+__END__
+
+=pod
+
=head1 NAME
HTML::Widgets::NavMenu::ExpandVal - an expand value that differentiates among
different expands
-For internal use only.
+=head1 VERSION
+
+version 1.0704
=head1 SYNOPSIS
my $expand_val = HTML::Widgets::NavMenu::ExpandVal->new('capture' => $bool);
+=head1 VERSION
+
+version 1.0704
+
+For internal use only.
+
=head1 FUNCTIONS
=head2 my $expand_val = HTML::Widgets::NavMenu::ExpandVal->new('capture' => $bool);
@@ -52,7 +65,132 @@
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::ExpandVal
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/HeaderRole.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/HeaderRole.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/HeaderRole.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/HeaderRole.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,5 +1,5 @@
package HTML::Widgets::NavMenu::HeaderRole;
-
+$HTML::Widgets::NavMenu::HeaderRole::VERSION = '1.0704';
use strict;
use warnings;
@@ -11,25 +11,24 @@
{
my $self = shift;
- return
- HTML::Widgets::NavMenu::Iterator::NavMenu::HeaderRole->new(
- $self->_get_nav_menu_traverser_args()
- );
+ return HTML::Widgets::NavMenu::Iterator::NavMenu::HeaderRole->new(
+ $self->_get_nav_menu_traverser_args() );
}
1;
__END__
+=pod
+
=head1 NAME
HTML::Widgets::NavMenu::HeaderRole - A Specialized HTML::Widgets::NavMenu
sub-class
-=head1 SYNOPOSIS
+=head1 VERSION
-Mostly the same as L except for the ability to
-specify C<'role' =E "header"> as one of the node attributes.
+version 1.0704
=head1 DESCRIPTION
@@ -49,6 +48,15 @@
An example of this use can be found on the Perl Beginners Site
( L ).
+=head1 VERSION
+
+version 1.0704
+
+=head1 SYNOPOSIS
+
+Mostly the same as L except for the ability to
+specify C<'role' =E "header"> as one of the node attributes.
+
=head1 SEE ALSO
L for the complete documentation of the super-class.
@@ -57,5 +65,132 @@
Shlomi Fish, L .
-=cut
+=head1 AUTHOR
+
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::HeaderRole
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/Base.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/Base.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/Base.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/Base.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,30 +1,19 @@
package HTML::Widgets::NavMenu::Iterator::Base;
-
+$HTML::Widgets::NavMenu::Iterator::Base::VERSION = '1.0704';
use strict;
use warnings;
use base qw(HTML::Widgets::NavMenu::Tree::Iterator);
-__PACKAGE__->mk_acc_ref([qw(
- _html
- nav_menu
- )]);
-
-=head1 NAME
-
-HTML::Widgets::NavMenu::Iterator::Base - base class for the iterator.
-
-=head1 SYNOPSIS
-
-For internal use only.
-
-=head1 METHODS
+__PACKAGE__->mk_acc_ref(
+ [
+ qw(
+ _html
+ nav_menu
+ )
+ ]
+);
-=head2 nav_menu
-
-Internal use.
-
-=cut
sub _init
{
@@ -33,10 +22,10 @@
$self->SUPER::_init($args);
- $self->nav_menu($args->{'nav_menu'}) or
- die "nav_menu not specified!";
+ $self->nav_menu( $args->{'nav_menu'} )
+ or die "nav_menu not specified!";
- $self->_html([]);
+ $self->_html( [] );
return 0;
}
@@ -44,14 +33,14 @@
sub _add_tags
{
my $self = shift;
- push (@{$self->_html()}, @_);
+ push( @{ $self->_html() }, @_ );
}
sub _is_root
{
my $self = shift;
- return ($self->stack->len() == 1);
+ return ( $self->stack->len() == 1 );
}
sub _is_top_separator
@@ -61,11 +50,6 @@
return $self->top->_node->separator;
}
-=head2 $self->get_initial_node()
-
-Gets the initial node.
-
-=cut
sub get_initial_node
{
@@ -73,38 +57,27 @@
return $self->nav_menu->_get_traversed_tree();
}
-=head2 $self->get_node_subs({ node => $node})
-
-Gets the subs of the node.
-
-=cut
-
sub get_node_subs
{
- my ($self, $args) = @_;
+ my ( $self, $args ) = @_;
my $node = $args->{'node'};
- return [ @{$node->subs()} ];
+ return [ @{ $node->subs() } ];
}
-=head2 $self->get_new_accum_state( { item => $item, node => $node } )
-
-Gets the new accumulated state.
-
-=cut
# TODO : This method is too long - refactor.
sub get_new_accum_state
{
- my ($self, $args) = @_;
+ my ( $self, $args ) = @_;
my $parent_item = $args->{'item'};
- my $node = $args->{'node'};
+ my $node = $args->{'node'};
my $prev_state;
- if (defined($parent_item))
+ if ( defined($parent_item) )
{
$prev_state = $parent_item->_accum_state();
}
@@ -114,52 +87,216 @@
}
my $show_always = 0;
- if (exists($prev_state->{'show_always'}))
+ if ( exists( $prev_state->{'show_always'} ) )
{
$show_always = $prev_state->{'show_always'};
}
- if (defined($node->show_always()))
+ if ( defined( $node->show_always() ) )
{
$show_always = $node->show_always();
}
my $rec_url_type;
- if (exists($prev_state->{'rec_url_type'}))
+ if ( exists( $prev_state->{'rec_url_type'} ) )
{
$rec_url_type = $prev_state->{'rec_url_type'};
}
- if (defined($node->rec_url_type()))
+ if ( defined( $node->rec_url_type() ) )
{
$rec_url_type = $node->rec_url_type();
}
- return
- {
- 'host' => ($node->host() ? $node->host() : $prev_state->{'host'}),
- 'show_always' => $show_always,
- 'rec_url_type' => $rec_url_type,
- };
+ return {
+ 'host' => ( $node->host() ? $node->host() : $prev_state->{'host'} ),
+ 'show_always' => $show_always,
+ 'rec_url_type' => $rec_url_type,
+ };
}
-=head2 my $array_ref = $self->get_results()
-
-Returns an array reference with the resultant HTML.
-
-=cut
sub get_results
{
my $self = shift;
- return [ @{$self->_html()} ];
+ return [ @{ $self->_html() } ];
}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+HTML::Widgets::NavMenu::Iterator::Base - base class for the iterator.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 SYNOPSIS
+
+For internal use only.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 METHODS
+
+=head2 nav_menu
+
+Internal use.
+
+=head2 $self->get_initial_node()
+
+Gets the initial node.
+
+=head2 $self->get_node_subs({ node => $node})
+
+Gets the subs of the node.
+
+=head2 $self->get_new_accum_state( { item => $item, node => $node } )
+
+Gets the new accumulated state.
+
+=head2 my $array_ref = $self->get_results()
+
+Returns an array reference with the resultant HTML.
+
=head1 COPYRIGHT & LICENSE
Copyright 2006 Shlomi Fish, all rights reserved.
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::Iterator::Base
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/Html.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/Html.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/Html.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/Html.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,5 +1,5 @@
package HTML::Widgets::NavMenu::Iterator::Html::Item;
-
+$HTML::Widgets::NavMenu::Iterator::Html::Item::VERSION = '1.0704';
use strict;
use warnings;
@@ -8,24 +8,13 @@
sub get_url_type
{
my $item = shift;
- return
- ($item->_node()->url_type() ||
- $item->_accum_state()->{'rec_url_type'} ||
- "rel");
+ return ( $item->_node()->url_type()
+ || $item->_accum_state()->{'rec_url_type'}
+ || "rel" );
}
package HTML::Widgets::NavMenu::Iterator::Html;
-
-=head1 NAME
-
-HTML::Widgets::NavMenu::Iterator::Html - an iterator for HTML.
-
-=head1 SYNOPSIS
-
-For internal use only.
-
-=head1 METHODS
-=cut
+$HTML::Widgets::NavMenu::Iterator::Html::VERSION = '1.0704';
use base qw(HTML::Widgets::NavMenu::Iterator::Base);
@@ -36,26 +25,19 @@
my $self = shift;
my $args = shift;
- return HTML::Widgets::NavMenu::Iterator::Html::Item->new(
- $args,
- );
+ return HTML::Widgets::NavMenu::Iterator::Html::Item->new( $args, );
}
-=head2 $self->node_start()
-
-Gets called upon node start.
-
-=cut
sub node_start
{
my $self = shift;
- if ($self->_is_root())
+ if ( $self->_is_root() )
{
return $self->_start_root();
}
- elsif ($self->_is_top_separator())
+ elsif ( $self->_is_top_separator() )
{
# _start_sep() is short for start_separator().
return $self->_start_sep();
@@ -66,21 +48,16 @@
}
}
-=head2 $self->node_end()
-
-Gets called upon node end.
-
-=cut
sub node_end
{
my $self = shift;
- if ($self->_is_root())
+ if ( $self->_is_root() )
{
return $self->end_root();
}
- elsif ($self->_is_top_separator())
+ elsif ( $self->_is_top_separator() )
{
return $self->_end_sep();
}
@@ -90,11 +67,6 @@
}
}
-=head2 $self->end_root()
-
-End-root event.
-
-=cut
sub end_root
{
@@ -106,18 +78,13 @@
sub _end_regular
{
my $self = shift;
- if ($self->top()->_num_subs() && $self->_is_expanded())
+ if ( $self->top()->_num_subs() && $self->_is_expanded() )
{
$self->_add_tags("");
}
$self->_add_tags("");
}
-=head2 $self->node_should_recurse()
-
-Override to determine when one should recurse to the node.
-
-=cut
sub node_should_recurse
{
@@ -125,11 +92,6 @@
return $self->_is_expanded();
}
-=head2 $self->get_a_tag()
-
-Renders the HTML for the opening a-tag.
-
-=cut
# Get the HTML tag.
#
@@ -139,14 +101,12 @@
my $item = $self->top();
my $node = $item->_node;
- my $tag ="title;
- $tag .= " href=\"" .
- escape_html(
- $self->nav_menu()->_get_url_to_item($item)
- ). "\"";
- if (defined($title))
+ $tag .= " href=\""
+ . escape_html( $self->nav_menu()->_get_url_to_item($item) ) . "\"";
+ if ( defined($title) )
{
$tag .= " title=\"$title\"";
}
@@ -154,13 +114,183 @@
return $tag;
}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+HTML::Widgets::NavMenu::Iterator::Html - an iterator for HTML.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 SYNOPSIS
+
+For internal use only.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 METHODS
+
+=head2 $self->node_start()
+
+Gets called upon node start.
+
+=head2 $self->node_end()
+
+Gets called upon node end.
+
+=head2 $self->end_root()
+
+End-root event.
+
+=head2 $self->node_should_recurse()
+
+Override to determine when one should recurse to the node.
+
+=head2 $self->get_a_tag()
+
+Renders the HTML for the opening a-tag.
+
=head1 COPYRIGHT & LICENSE
Copyright 2006 Shlomi Fish, all rights reserved.
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::Iterator::Html::Item
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/JQTreeView.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/JQTreeView.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/JQTreeView.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/JQTreeView.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,5 +1,5 @@
package HTML::Widgets::NavMenu::Iterator::JQTreeView;
-
+$HTML::Widgets::NavMenu::Iterator::JQTreeView::VERSION = '1.0704';
use strict;
use warnings;
@@ -16,33 +16,19 @@
$self->SUPER::_init($args);
# Make a fresh copy just to be on the safe side.
- $self->_ul_classes([ @{$args->{'ul_classes'}} ]);
+ $self->_ul_classes( [ @{ $args->{'ul_classes'} } ] );
return 0;
}
-=head1 NAME
-
-HTML::Widgets::NavMenu::Iterator::JQTreeView - an iterator for JQuery
-TreeView's navigation menus.
-
-=head1 SYNOPSIS
-
-See L .
-
-For internal use only.
-=head1 METHODS
-
-=cut
sub _calc_open_li_tag
{
my $self = shift;
my $id_attr = $self->_calc_li_id_attr();
- return
- (
+ return (
$self->_is_expanded_for_treeview()
? (qq{})
: ("")
@@ -51,21 +37,15 @@
return;
}
-=head2 get_currently_active_text ( $node )
-
-Calculates the highlighted text for the node C<$node>. Normally surrounds it
-with C<<< ... >>> tags.
-
-=cut
sub _start_handle_non_role
{
- my $self = shift;
- my $top_item = $self->top;
- my @tags_to_add = ($self->_calc_open_li_tag(), $self->get_link_tag());
- if ($top_item->_num_subs_to_go() && $self->_is_expanded())
+ my $self = shift;
+ my $top_item = $self->top;
+ my @tags_to_add = ( $self->_calc_open_li_tag(), $self->get_link_tag() );
+ if ( $top_item->_num_subs_to_go() && $self->_is_expanded() )
{
- push @tags_to_add, ($self->get_open_sub_menu_tags());
+ push @tags_to_add, ( $self->get_open_sub_menu_tags() );
}
$self->_add_tags(@tags_to_add);
@@ -90,15 +70,174 @@
my $node = $self->top->_node();
- return ($node->expanded() || $self->top->_accum_state->{'show_always'});
+ return ( $node->expanded() || $self->top->_accum_state->{'show_always'} );
}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+HTML::Widgets::NavMenu::Iterator::JQTreeView - an iterator for JQuery
+TreeView's navigation menus.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 SYNOPSIS
+
+See L .
+
+For internal use only.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 METHODS
+
+=head2 get_currently_active_text ( $node )
+
+Calculates the highlighted text for the node C<$node>. Normally surrounds it
+with C<<< ... >>> tags.
+
=head1 COPYRIGHT & LICENSE
Copyright 2006 Shlomi Fish, all rights reserved.
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::Iterator::JQTreeView
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/NavMenu/HeaderRole.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/NavMenu/HeaderRole.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/NavMenu/HeaderRole.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/NavMenu/HeaderRole.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,37 +1,27 @@
package HTML::Widgets::NavMenu::Iterator::NavMenu::HeaderRole;
-
+$HTML::Widgets::NavMenu::Iterator::NavMenu::HeaderRole::VERSION = '1.0704';
use strict;
use warnings;
use base qw(HTML::Widgets::NavMenu::Iterator::NavMenu);
-__PACKAGE__->mk_acc_ref([qw(
- _was_role
-)]);
-
-=head1 NAME
-
-HTML::Widgets::NavMenu::Iterator::NavMenu::HeaderRole - a nav-menu iterator
-for the HeaderRole sub-class.
-
-=head1 OVER-RIDED METHODS
-
-=head2 $iter->_start_handle_role()
+__PACKAGE__->mk_acc_ref(
+ [
+ qw(
+ _was_role
+ )
+ ]
+);
-Handles the handling the role. Accepts the C<"header"> role and defaults to the
-default behaviour with all others.
-
-=cut
sub _start_handle_non_role
{
my $self = shift;
- if ($self->_was_role())
+ if ( $self->_was_role() )
{
$self->_add_tags(
- $self->gen_ul_tag({'depth' => $self->stack->len()-2})
- );
+ $self->gen_ul_tag( { 'depth' => $self->stack->len() - 2 } ) );
}
$self->_was_role(0);
@@ -42,15 +32,13 @@
sub _start_handle_role
{
my $self = shift;
- if ($self->get_role() eq "header")
+ if ( $self->get_role() eq "header" )
{
- if (! $self->_was_role())
+ if ( !$self->_was_role() )
{
$self->_add_tags("");
}
- $self->_add_tags(
- "", $self->get_link_tag(), "
",
- );
+ $self->_add_tags( "", $self->get_link_tag(), "
", );
$self->_was_role(1);
}
@@ -60,17 +48,11 @@
}
}
-=head2 $self->_end_handle_role()
-
-Ends the role. Accepts the C<"header"> role and defaults to the
-default behaviour with all others.
-
-=cut
sub _end_handle_role
{
my $self = shift;
- if ($self->get_role() eq "header")
+ if ( $self->get_role() eq "header" )
{
# Do nothing;
}
@@ -80,13 +62,170 @@
}
}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+HTML::Widgets::NavMenu::Iterator::NavMenu::HeaderRole - a nav-menu iterator
+for the HeaderRole sub-class.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 OVER-RIDED METHODS
+
+=head2 $iter->_start_handle_role()
+
+Handles the handling the role. Accepts the C<"header"> role and defaults to the
+default behaviour with all others.
+
+=head2 $self->_end_handle_role()
+
+Ends the role. Accepts the C<"header"> role and defaults to the
+default behaviour with all others.
+
=head1 COPYRIGHT & LICENSE
Copyright 2006 Shlomi Fish, all rights reserved.
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::Iterator::NavMenu::HeaderRole
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/NavMenu.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/NavMenu.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/NavMenu.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/NavMenu.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,5 +1,5 @@
package HTML::Widgets::NavMenu::Iterator::NavMenu;
-
+$HTML::Widgets::NavMenu::Iterator::NavMenu::VERSION = '1.0704';
use strict;
use warnings;
@@ -7,20 +7,14 @@
use HTML::Widgets::NavMenu::EscapeHtml;
-__PACKAGE__->mk_acc_ref([qw(
- _ul_classes
- )]);
-
-=head1 NAME
-
-HTML::Widgets::NavMenu::Iterator::NavMenu - navmenu iterator.
-
-=head1 SYNOPSIS
-
-For internal use only.
+__PACKAGE__->mk_acc_ref(
+ [
+ qw(
+ _ul_classes
+ )
+ ]
+);
-=head1 METHODS
-=cut
sub _init
{
@@ -30,7 +24,7 @@
$self->SUPER::_init($args);
# Make a fresh copy just to be on the safe side.
- $self->_ul_classes([ @{$args->{'ul_classes'}} ]);
+ $self->_ul_classes( [ @{ $args->{'ul_classes'} } ] );
return 0;
}
@@ -41,50 +35,40 @@
my $li_id = $self->top()->_li_id;
- return
- (defined ($li_id)
+ return (
+ defined($li_id)
? qq/ id="/ . escape_html($li_id) . qq/"/
: q//
);
}
-=head2 $self->gen_ul_tag({depth => $depth});
-
-Generate a UL tag of depth $depth.
-
-=cut
# Depth is 1 for the uppermost depth.
sub gen_ul_tag
{
- my ($self, $args) = @_;
+ my ( $self, $args ) = @_;
my $depth = $args->{'depth'};
- my $class = $self->_get_ul_class({'depth' => $depth});
+ my $class = $self->_get_ul_class( { 'depth' => $depth } );
- return "";
}
sub _get_ul_class
{
- my ($self, $args) = @_;
+ my ( $self, $args ) = @_;
my $depth = $args->{'depth'};
- return $self->_ul_classes->[$depth-1];
+ return $self->_ul_classes->[ $depth - 1 ];
}
-=head2 get_currently_active_text ( $node )
-
-Calculates the highlighted text for the node C<$node>. Normally surrounds it
-with C<<< ... >>> tags.
-
-=cut
sub get_currently_active_text
{
@@ -93,17 +77,12 @@
return "" . $node->text() . "";
}
-=head2 $self->get_link_tag()
-
-Gets the tag for the link - an item in the menu.
-
-=cut
sub get_link_tag
{
my $self = shift;
my $node = $self->top->_node();
- if ($node->CurrentlyActive())
+ if ( $node->CurrentlyActive() )
{
return $self->get_currently_active_text($node);
}
@@ -139,31 +118,23 @@
return $self->_start_handle_non_role();
}
-=head2 my @tags = $self->get_open_sub_menu_tags()
-
-Gets the tags to open a new sub menu.
-
-=cut
sub get_open_sub_menu_tags
{
my $self = shift;
- return ("
",
- $self->gen_ul_tag(
- {'depth' => $self->stack->len()}
- )
- );
+ return ( "
",
+ $self->gen_ul_tag( { 'depth' => $self->stack->len() } ) );
}
sub _start_handle_non_role
{
- my $self = shift;
+ my $self = shift;
my $top_item = $self->top;
- my @tags_to_add = (("- _calc_li_id_attr() . ">"),
- $self->get_link_tag());
- if ($top_item->_num_subs_to_go() && $self->_is_expanded())
+ my @tags_to_add =
+ ( ( "
- _calc_li_id_attr() . ">" ), $self->get_link_tag() );
+ if ( $top_item->_num_subs_to_go() && $self->_is_expanded() )
{
- push @tags_to_add, ($self->get_open_sub_menu_tags());
+ push @tags_to_add, ( $self->get_open_sub_menu_tags() );
}
$self->_add_tags(@tags_to_add);
}
@@ -173,15 +144,15 @@
my $self = shift;
my $top_item = $self->top;
- my $node = $self->top->_node();
+ my $node = $self->top->_node();
- if ($self->_is_hidden())
+ if ( $self->_is_hidden() )
{
# Do nothing
}
else
{
- if ($self->_is_role_specified())
+ if ( $self->_is_role_specified() )
{
$self->_start_handle_role();
}
@@ -199,7 +170,7 @@
$self->_add_tags(
$self->gen_ul_tag(
{
- 'depth' => $self->stack->len()-1
+ 'depth' => $self->stack->len() - 1
}
)
);
@@ -220,11 +191,11 @@
sub _end_regular
{
my $self = shift;
- if ($self->_is_hidden())
+ if ( $self->_is_hidden() )
{
# Do nothing
}
- elsif ($self->_is_role_specified())
+ elsif ( $self->_is_role_specified() )
{
$self->_end_handle_role();
}
@@ -244,14 +215,9 @@
{
my $self = shift;
my $node = $self->top->_node();
- return ($node->expanded() || $self->top->_accum_state->{'show_always'});
+ return ( $node->expanded() || $self->top->_accum_state->{'show_always'} );
}
-=head2 $self->get_role()
-
-Retrieves the current role.
-
-=cut
sub get_role
{
@@ -262,8 +228,180 @@
sub _is_role_specified
{
my $self = shift;
- return defined($self->get_role());
+ return defined( $self->get_role() );
}
1;
+__END__
+
+=pod
+
+=head1 NAME
+
+HTML::Widgets::NavMenu::Iterator::NavMenu - navmenu iterator.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 SYNOPSIS
+
+For internal use only.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 METHODS
+
+=head2 $self->gen_ul_tag({depth => $depth});
+
+Generate a UL tag of depth $depth.
+
+=head2 get_currently_active_text ( $node )
+
+Calculates the highlighted text for the node C<$node>. Normally surrounds it
+with C<<< ... >>> tags.
+
+=head2 $self->get_link_tag()
+
+Gets the tag for the link - an item in the menu.
+
+=head2 my @tags = $self->get_open_sub_menu_tags()
+
+Gets the tags to open a new sub menu.
+
+=head2 $self->get_role()
+
+Retrieves the current role.
+
+=head1 AUTHOR
+
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::Iterator::NavMenu
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/SiteMap.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/SiteMap.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Iterator/SiteMap.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Iterator/SiteMap.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,21 +1,10 @@
package HTML::Widgets::NavMenu::Iterator::SiteMap;
-
+$HTML::Widgets::NavMenu::Iterator::SiteMap::VERSION = '1.0704';
use strict;
use warnings;
use base qw(HTML::Widgets::NavMenu::Iterator::Html);
-=head1 NAME
-
-HTML::Widgets::NavMenu::Iterator::SiteMap - a site-map iterator.
-
-=head1 SYNOPSIS
-
-For internal use only.
-
-=head1 METHODS
-
-=cut
sub _start_root
{
@@ -33,18 +22,18 @@
my $self = shift;
my $top_item = $self->top;
- my $node = $self->top->_node();
+ my $node = $self->top->_node();
$self->_add_tags("
- ");
- my $tag = $self->get_a_tag();
+ my $tag = $self->get_a_tag();
my $title = $node->title();
- if (defined($title))
+ if ( defined($title) )
{
$tag .= " - $title";
}
$self->_add_tags($tag);
- if ($top_item->_num_subs_to_go())
+ if ( $top_item->_num_subs_to_go() )
{
$self->_add_tags("
");
$self->_add_tags("");
@@ -60,12 +49,163 @@
return 1;
}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+HTML::Widgets::NavMenu::Iterator::SiteMap - a site-map iterator.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 SYNOPSIS
+
+For internal use only.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 METHODS
+
=head1 COPYRIGHT & LICENSE
Copyright 2006 Shlomi Fish, all rights reserved.
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::Iterator::SiteMap
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/JQueryTreeView.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/JQueryTreeView.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/JQueryTreeView.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/JQueryTreeView.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,5 +1,5 @@
package HTML::Widgets::NavMenu::JQueryTreeView;
-
+$HTML::Widgets::NavMenu::JQueryTreeView::VERSION = '1.0704';
use strict;
use warnings;
@@ -11,25 +11,24 @@
{
my $self = shift;
- return
- HTML::Widgets::NavMenu::Iterator::JQTreeView->new(
- $self->_get_nav_menu_traverser_args()
- );
+ return HTML::Widgets::NavMenu::Iterator::JQTreeView->new(
+ $self->_get_nav_menu_traverser_args() );
}
1;
__END__
+=pod
+
=head1 NAME
HTML::Widgets::NavMenu::JQueryTreeView - A Specialized HTML::Widgets::NavMenu
sub-class
-=head1 SYNOPOSIS
+=head1 VERSION
-Mostly the same as L execpt that it renders a fully
-expanded tree suitable for input to JQuery's treeview plugin
+version 1.0704
=head1 DESCRIPTION
@@ -39,6 +38,15 @@
An example of this use can be found in Shlomi Fish's Homepage
( L ).
+=head1 VERSION
+
+version 1.0704
+
+=head1 SYNOPOSIS
+
+Mostly the same as L execpt that it renders a fully
+expanded tree suitable for input to JQuery's treeview plugin
+
=head1 SEE ALSO
L for the complete documentation of the super-class.
@@ -54,5 +62,132 @@
You can use, modify and distribute this module under the terms of the MIT X11
license. ( L ).
-=cut
+=head1 AUTHOR
+
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::JQueryTreeView
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Object.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Object.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Object.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Object.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,5 +1,5 @@
package HTML::Widgets::NavMenu::Object;
-
+$HTML::Widgets::NavMenu::Object::VERSION = '1.0704';
use strict;
use warnings;
@@ -8,7 +8,7 @@
sub new
{
my $class = shift;
- my $self = {};
+ my $self = {};
bless $self, $class;
@@ -39,31 +39,17 @@
}
-=head2 __PACKAGE__->mk_accessors(qw(method1 method2 method3))
-
-Equivalent to L's mk_accessors only using Class::XSAccessor.
-It beats running an ugly script on my code, and can be done at run-time.
-
-Gotta love dynamic languages like Perl 5.
-
-=cut
-
sub mk_accessors
{
my $package = shift;
- return $package->mk_acc_ref([@_]);
+ return $package->mk_acc_ref( [@_] );
}
-=head2 __PACKAGE__->mk_acc_ref([qw(method1 method2 method3)])
-
-Creates the accessors in the array-ref of names at run-time.
-
-=cut
sub mk_acc_ref
{
my $package = shift;
- my $names = shift;
+ my $names = shift;
my $mapping = +{ map { $_ => $_ } @$names };
@@ -77,14 +63,40 @@
}
+
+1;
+
+__END__
+
+=pod
+
=head1 NAME
HTML::Widgets::NavMenu::Object - a base object for HTML::Widgets::NavMenu
+=head1 VERSION
+
+version 1.0704
+
=head1 SYNOPSIS
For internal use only
+=head2 __PACKAGE__->mk_accessors(qw(method1 method2 method3))
+
+Equivalent to L's mk_accessors only using Class::XSAccessor.
+It beats running an ugly script on my code, and can be done at run-time.
+
+Gotta love dynamic languages like Perl 5.
+
+=head2 __PACKAGE__->mk_acc_ref([qw(method1 method2 method3)])
+
+Creates the accessors in the array-ref of names at run-time.
+
+=head1 VERSION
+
+version 1.0704
+
=head1 FUNCTIONS
=head2 my $obj = HTML::Widgets::NavMenu::Object->new(@args)
@@ -101,6 +113,132 @@
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::Object
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Predicate.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Predicate.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Predicate.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Predicate.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,13 +1,11 @@
package HTML::Widgets::NavMenu::Predicate;
-
+$HTML::Widgets::NavMenu::Predicate::VERSION = '1.0704';
use strict;
use warnings;
use base 'HTML::Widgets::NavMenu::Object';
-__PACKAGE__->mk_acc_ref([
- qw(type bool regexp callback _capture)],
- );
+__PACKAGE__->mk_acc_ref( [qw(type bool regexp callback _capture)], );
use HTML::Widgets::NavMenu::ExpandVal;
@@ -24,22 +22,22 @@
return 0;
}
-my %true_vals = (map { $_ => 1 } (qw(1 yes true True)));
+my %true_vals = ( map { $_ => 1 } (qw(1 yes true True)) );
sub _is_true_bool
{
my $self = shift;
- my $val = shift;
- return exists($true_vals{$val});
+ my $val = shift;
+ return exists( $true_vals{$val} );
}
-my %false_vals = (map { $_ => 1 } (qw(0 no false False)));
+my %false_vals = ( map { $_ => 1 } (qw(0 no false False)) );
sub _is_false_bool
{
my $self = shift;
- my $val = shift;
- return exists($false_vals{$val});
+ my $val = shift;
+ return exists( $false_vals{$val} );
}
sub _get_normalized_spec
@@ -47,24 +45,25 @@
my $self = shift;
my $spec = shift;
- if (ref($spec) eq "HASH")
+ if ( ref($spec) eq "HASH" )
{
return $spec;
}
- if (ref($spec) eq "CODE")
+ if ( ref($spec) eq "CODE" )
{
return +{ 'cb' => $spec };
}
- if ($self->_is_true_bool($spec))
+ if ( $self->_is_true_bool($spec) )
{
return +{ 'bool' => 1, };
}
- if ($self->_is_false_bool($spec))
+ if ( $self->_is_false_bool($spec) )
{
return +{ 'bool' => 0, };
}
+
# Default to regular expression
- if (ref($spec) eq "")
+ if ( ref($spec) eq "" )
{
return +{ 're' => $spec, };
}
@@ -77,11 +76,7 @@
my $spec = shift;
# TODO: Replace me with the real logic.
- $self->_assign_spec(
- $self->_get_normalized_spec(
- $spec,
- ),
- );
+ $self->_assign_spec( $self->_get_normalized_spec( $spec, ), );
}
sub _assign_spec
@@ -89,57 +84,50 @@
my $self = shift;
my $spec = shift;
- if (exists($spec->{'cb'}))
+ if ( exists( $spec->{'cb'} ) )
{
$self->type("callback");
- $self->callback($spec->{'cb'});
+ $self->callback( $spec->{'cb'} );
}
- elsif (exists($spec->{'re'}))
+ elsif ( exists( $spec->{'re'} ) )
{
$self->type("regexp");
- $self->regexp($spec->{'re'});
+ $self->regexp( $spec->{'re'} );
}
- elsif (exists($spec->{'bool'}))
+ elsif ( exists( $spec->{'bool'} ) )
{
$self->type("bool");
- $self->bool($spec->{'bool'});
+ $self->bool( $spec->{'bool'} );
}
else
{
die "Neither 'cb' nor 're' nor 'bool' were specified in the spec.";
}
- $self->_capture(
- (
- (!exists($spec->{capt})) ? 1 : $spec->{capt}
- )
- );
+ $self->_capture( ( ( !exists( $spec->{capt} ) ) ? 1 : $spec->{capt} ) );
}
-
sub _evaluate_bool
{
- my ($self, $args) = @_;
+ my ( $self, $args ) = @_;
- my $path_info = $args->{'path_info'};
+ my $path_info = $args->{'path_info'};
my $current_host = $args->{'current_host'};
my $type = $self->type();
- if ($type eq "callback")
+ if ( $type eq "callback" )
{
- return $self->callback()->(
- %$args
- );
+ return $self->callback()->(%$args);
}
- elsif ($type eq "bool")
+ elsif ( $type eq "bool" )
{
return $self->bool();
}
- else # $type eq "regexp"
+ else # $type eq "regexp"
{
my $re = $self->regexp();
- return (($re eq "") || ($path_info =~ /$re/));
+ return ( ( $re eq "" ) || ( $path_info =~ /$re/ ) );
}
}
@@ -147,9 +135,9 @@
{
my $self = shift;
- my $bool = $self->_evaluate_bool({@_});
+ my $bool = $self->_evaluate_bool( {@_} );
- if (!$bool)
+ if ( !$bool )
{
return $bool;
}
@@ -163,15 +151,30 @@
}
}
+
+1;
+
+__END__
+
+=pod
+
=head1 NAME
HTML::Widgets::NavMenu::Predicate - a predicate object for
HTML::Widgets::NavMenu
+=head1 VERSION
+
+version 1.0704
+
=head1 SYNOPSIS
my $pred = HTML::Widgets::NavMenu::Predicate->new('spec' => $spec);
+=head1 VERSION
+
+version 1.0704
+
=head1 FUNCTIONS
=head2 my $pred = HTML::Widgets::NavMenu::Predicate->new('spec' => $spec)
@@ -205,7 +208,132 @@
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::Predicate
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/TagGen.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/TagGen.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/TagGen.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/TagGen.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,5 +1,5 @@
package HTML::Widgets::NavMenu::TagGen;
-
+$HTML::Widgets::NavMenu::TagGen::VERSION = '1.0704';
use strict;
use warnings;
@@ -7,18 +7,72 @@
use HTML::Widgets::NavMenu::EscapeHtml;
-__PACKAGE__->mk_acc_ref([
- qw(name attributes)]
-);
+__PACKAGE__->mk_acc_ref( [qw(name attributes)] );
+
+
+sub _init
+{
+ my ( $self, $args ) = @_;
+
+ $self->name( $args->{'name'} );
+ $self->attributes( $args->{'attributes'} );
+
+ return 0;
+}
+
+
+sub gen
+{
+ my $self = shift;
+
+ my $attr_values = shift;
+
+ my $is_standalone = shift || 0;
+
+ my @tag_list = keys(%$attr_values);
+
+ @tag_list = ( grep { defined( $attr_values->{$_} ) } @tag_list );
+
+ @tag_list = ( sort { $a cmp $b } @tag_list );
+
+ my $attr_spec = $self->attributes();
+
+ return "<" . $self->name() . join(
+ "",
+ map {
+ " $_=\""
+ . (
+ $attr_spec->{$_}->{'escape'}
+ ? escape_html( $attr_values->{$_} )
+ : $attr_values->{$_}
+ )
+ . "\""
+ } @tag_list
+ ) . ( $is_standalone ? " /" : "" ) . ">";
+}
+
+1;
+
+__END__
+
+=pod
=head1 NAME
HTML::Widgets::NavMenu::TagGen - class to generate tags.
+=head1 VERSION
+
+version 1.0704
+
=head1 SYNOPSIS
For internal use only.
+=head1 VERSION
+
+version 1.0704
+
=head1 METHODS
=head2 name
@@ -29,49 +83,136 @@
For internal use.
-=cut
+=head2 $self->gen($attribute_values, $is_standalone)
-sub _init
-{
- my ($self, $args) = @_;
+Generate the tag.
- $self->name($args->{'name'});
- $self->attributes($args->{'attributes'});
+=head1 AUTHOR
- return 0;
-}
+Shlomi Fish
-=head2 $self->gen($attribute_values, $is_standalone)
+=head1 COPYRIGHT AND LICENSE
-Generate the tag.
+This software is Copyright (c) 2014 by Shlomi Fish.
-=cut
+This is free software, licensed under:
-sub gen
-{
- my $self = shift;
+ The MIT (X11) License
- my $attr_values = shift;
+=head1 BUGS
- my $is_standalone = shift || 0;
+Please report any bugs or feature requests on the bugtracker website
+L
- my @tag_list = keys(%$attr_values);
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
- @tag_list = (grep { defined($attr_values->{$_}) } @tag_list);
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
- @tag_list = (sort { $a cmp $b } @tag_list);
+=head1 SUPPORT
- my $attr_spec = $self->attributes();
+=head2 Perldoc
- return "<" . $self->name() .
- join("", map { " $_=\"" .
- ($attr_spec->{$_}->{'escape'} ?
- escape_html($attr_values->{$_})
- : $attr_values->{$_}
- ) . "\""
- } @tag_list) .
- ($is_standalone ? " /" : "") . ">";
-}
+You can find documentation for this module with the perldoc command.
-1;
+ perldoc HTML::Widgets::NavMenu::TagGen
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Tree/Iterator/Item.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Tree/Iterator/Item.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Tree/Iterator/Item.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Tree/Iterator/Item.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,43 +1,38 @@
package HTML::Widgets::NavMenu::Tree::Iterator::Item;
-
+$HTML::Widgets::NavMenu::Tree::Iterator::Item::VERSION = '1.0704';
use strict;
use warnings;
use base qw(HTML::Widgets::NavMenu::Object);
-__PACKAGE__->mk_acc_ref([qw(
- _node
- _subs
- _sub_idx
- _visited
- _accum_state
-)]);
-
-=head1 NAME
-
-HTML::Widgets::NavMenu::Tree::Iterator::Item - an item for the tree iterator.
-
-=head1 SYNOPSIS
-
-For internal use only.
+__PACKAGE__->mk_acc_ref(
+ [
+ qw(
+ _node
+ _subs
+ _sub_idx
+ _visited
+ _accum_state
+ )
+ ]
+);
-=cut
sub _init
{
- my ($self, $args) = @_;
+ my ( $self, $args ) = @_;
- $self->_node($args->{'node'}) or
- die "node not specified!";
+ $self->_node( $args->{'node'} )
+ or die "node not specified!";
- $self->_subs($args->{'subs'}) or
- die "subs not specified!";
+ $self->_subs( $args->{'subs'} )
+ or die "subs not specified!";
$self->_sub_idx(-1);
$self->_visited(0);
- $self->_accum_state($args->{'accum_state'}) or
- die "accum_state not specified!";
+ $self->_accum_state( $args->{'accum_state'} )
+ or die "accum_state not specified!";
return 0;
}
@@ -54,13 +49,13 @@
$self->_visited(1);
- if ($self->_num_subs_to_go())
+ if ( $self->_num_subs_to_go() )
{
- return $self->_subs()->[$self->_sub_idx($self->_sub_idx()+1)];
+ return $self->_subs()->[ $self->_sub_idx( $self->_sub_idx() + 1 ) ];
}
else
{
- return undef;
+ return;
}
}
@@ -80,28 +75,177 @@
sub _num_subs
{
my $self = shift;
- return scalar(@{$self->_subs()});
+ return scalar( @{ $self->_subs() } );
}
sub _get_sub
{
- my $self = shift;
+ my $self = shift;
my $sub_num = shift;
return $self->_subs()->[$sub_num];
}
-sub _li_id {
+sub _li_id
+{
return shift->_node->li_id();
}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+HTML::Widgets::NavMenu::Tree::Iterator::Item - an item for the tree iterator.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 SYNOPSIS
+
+For internal use only.
+
+=head1 VERSION
+
+version 1.0704
+
=head1 COPYRIGHT & LICENSE
Copyright 2006 Shlomi Fish, all rights reserved.
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::Tree::Iterator::Item
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Tree/Iterator/Stack.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Tree/Iterator/Stack.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Tree/Iterator/Stack.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Tree/Iterator/Stack.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,11 +1,11 @@
package HTML::Widgets::NavMenu::Tree::Iterator::Stack;
-
+$HTML::Widgets::NavMenu::Tree::Iterator::Stack::VERSION = '1.0704';
use strict;
use warnings;
use base qw(HTML::Widgets::NavMenu::Object);
-__PACKAGE__->mk_acc_ref([qw(_items)]);
+__PACKAGE__->mk_acc_ref( [qw(_items)] );
sub _init
{
@@ -16,45 +16,25 @@
return 0;
}
-=head1 NAME
-
-HTML::Widgets::NavMenu::Tree::Iterator::Stack - a simple stack class.
-
-=head1 SYNOPSIS
-
-For internal use only.
-
-=head1 METHODS
-=cut
sub push
{
my $self = shift;
my $item = shift;
- push @{$self->_items()}, $item;
+ push @{ $self->_items() }, $item;
return 0;
}
-=head2 $s->push($myitem)
-
-Pushes an item.
-
-=cut
sub len
{
my $self = shift;
- return scalar(@{$self->_items()});
+ return scalar( @{ $self->_items() } );
}
-=head2 $s->len($myitem)
-
-Returns the number of elements.
-
-=cut
sub top
{
@@ -62,59 +42,87 @@
return $self->_items->[-1];
}
-=head2 $s->top()
-
-Returns the highest item.
-
-=cut
-
sub item
{
- my $self = shift;
+ my $self = shift;
my $index = shift;
return $self->_items->[$index];
}
-=head2 my $item = $s->item($index)
-
-Returns the item of index C<$index>.
-
-=cut
sub pop
{
my $self = shift;
- return pop(@{$self->_items()});
+ return pop( @{ $self->_items() } );
}
-=head2 my $item = $s->pop()
-
-Pops the item and returns it.
-
-=cut
sub is_empty
{
my $self = shift;
- return ($self->len() == 0);
+ return ( $self->len() == 0 );
}
-=head2 my $bool = $s->is_empty()
-
-Returns true if the stack is empty.
-
-=cut
sub reset
{
my $self = shift;
- $self->_items([]);
+ $self->_items( [] );
return 0;
}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+HTML::Widgets::NavMenu::Tree::Iterator::Stack - a simple stack class.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 SYNOPSIS
+
+For internal use only.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 METHODS
+
+=head2 $s->push($myitem)
+
+Pushes an item.
+
+=head2 $s->len($myitem)
+
+Returns the number of elements.
+
+=head2 $s->top()
+
+Returns the highest item.
+
+=head2 my $item = $s->item($index)
+
+Returns the item of index C<$index>.
+
+=head2 my $item = $s->pop()
+
+Pops the item and returns it.
+
+=head2 my $bool = $s->is_empty()
+
+Returns true if the stack is empty.
+
=head2 $s->reset();
Empties the stack
@@ -125,7 +133,132 @@
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc HTML::Widgets::NavMenu::Tree::Iterator::Stack
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L
+
+=item *
+
+AnnoCPAN
+
+The AnnoCPAN is a website that allows community annotations of Perl module documentation.
+
+L
+
+=item *
+
+CPAN Ratings
+
+The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
+
+L
+
+=item *
+
+CPANTS
+
+The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
+
+L
+
+=item *
+
+CPAN Testers
+
+The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
+
+L
+
+=item *
+
+CPAN Testers Matrix
+
+The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
+
+L
+
+=item *
+
+CPAN Testers Dependencies
+
+The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
+
+L
+
+=back
+
+=head2 Bugs / Feature Requests
+
+Please report any bugs or feature requests by email to C, or through
+the web interface at L. You will be automatically notified of any
+progress on the request by the system.
+
+=head2 Source Code
+
+The code is open to the world, and available for you to hack on. Please feel free to browse it and play
+with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
+from your repository :)
+
+L
+
+ git clone git://github.com/shlomif/perl-HTML-Widgets-NavMenu.git
+
+=cut
diff -Nru libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Tree/Iterator.pm libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Tree/Iterator.pm
--- libhtml-widgets-navmenu-perl-1.0703/lib/HTML/Widgets/NavMenu/Tree/Iterator.pm 2015-06-10 06:55:40.000000000 +0000
+++ libhtml-widgets-navmenu-perl-1.0704/lib/HTML/Widgets/NavMenu/Tree/Iterator.pm 2019-03-11 20:38:28.000000000 +0000
@@ -1,5 +1,5 @@
package HTML::Widgets::NavMenu::Tree::Iterator;
-
+$HTML::Widgets::NavMenu::Tree::Iterator::VERSION = '1.0704';
use strict;
use warnings;
@@ -8,47 +8,26 @@
use HTML::Widgets::NavMenu::Tree::Iterator::Stack;
use HTML::Widgets::NavMenu::Tree::Iterator::Item;
-__PACKAGE__->mk_acc_ref([qw(
- coords
- stack
- )]);
-
-=head1 NAME
-
-HTML::Widgets::NavMenu::Tree::Iterator - an iterator for HTML.
-
-=head1 SYNOPSIS
-
-For internal use only.
-
-=head1 METHODS
-
-=head2 coords
-
-Internal use.
-
-=head2 stack
-
-Internal use.
-
-=cut
-
+__PACKAGE__->mk_acc_ref(
+ [
+ qw(
+ coords
+ stack
+ )
+ ]
+);
sub _init
{
my $self = shift;
- $self->stack(HTML::Widgets::NavMenu::Tree::Iterator::Stack->new());
+ $self->stack( HTML::Widgets::NavMenu::Tree::Iterator::Stack->new() );
return 0;
}
-=head2 $self->top()
-
-Retrieves the stack top item.
-=cut
sub top
{
my $self = shift;
@@ -57,40 +36,31 @@
sub _construct_new_item
{
- my ($self, $args) = @_;
+ my ( $self, $args ) = @_;
- return HTML::Widgets::NavMenu::Tree::Iterator::Item->new(
- $args
- );
+ return HTML::Widgets::NavMenu::Tree::Iterator::Item->new($args);
}
-=head2 $self->get_new_item({'node' => $node, 'parent_item' => $parent})
-
-Gets the new item.
-
-=cut
sub get_new_item
{
- my ($self, $args) = @_;
+ my ( $self, $args ) = @_;
- my $node = $args->{'node'};
+ my $node = $args->{'node'};
my $parent_item = $args->{'parent_item'};
- return
- $self->_construct_new_item(
- {
- 'node' => $node,
- 'subs' => $self->get_node_subs( { 'node' => $node } ),
- 'accum_state' =>
- $self->get_new_accum_state(
- {
- 'item' => $parent_item,
- 'node' => $node,
- }
- ),
- }
- );
+ return $self->_construct_new_item(
+ {
+ 'node' => $node,
+ 'subs' => $self->get_node_subs( { 'node' => $node } ),
+ 'accum_state' => $self->get_new_accum_state(
+ {
+ 'item' => $parent_item,
+ 'node' => $node,
+ }
+ ),
+ }
+ );
}
sub _push_into_stack
@@ -102,51 +72,47 @@
$self->stack()->push(
$self->get_new_item(
{
- 'node' => $node,
+ 'node' => $node,
'parent_item' => $self->top(),
}
),
);
}
-=head2 $self->traverse()
-
-Traverses the tree.
-
-=cut
sub traverse
{
my $self = shift;
- $self->_push_into_stack($self->get_initial_node());
+ $self->_push_into_stack( $self->get_initial_node() );
- $self->coords([]);
+ $self->coords( [] );
my $top_item;
- MAIN_LOOP: while ($top_item = $self->top())
+MAIN_LOOP: while ( $top_item = $self->top() )
{
my $visited = $top_item->_is_visited();
- if (!$visited)
+ if ( !$visited )
{
$self->node_start();
}
- my $sub_item =
- ($self->node_should_recurse() ?
- $top_item->_visit() :
- undef);
+ my $sub_item = (
+ $self->node_should_recurse()
+ ? $top_item->_visit()
+ : undef
+ );
- if (defined($sub_item))
+ if ( defined($sub_item) )
{
- push @{$self->coords()}, $top_item->_visited_index();
+ push @{ $self->coords() }, $top_item->_visited_index();
$self->_push_into_stack(
$self->get_node_from_sub(
{
'item' => $top_item,
- 'sub' => $sub_item,
+ 'sub' => $sub_item,
}
),
);
@@ -156,19 +122,13 @@
{
$self->node_end();
$self->stack->pop();
- pop(@{$self->coords()})
+ pop( @{ $self->coords() } );
}
}
return 0;
}
-=head2 $self->get_node_from_sub()
-
-This function can be overridden to generate a node from the sub-nodes
-returned by get_node_subs() in a different way than the default.
-
-=cut
sub get_node_from_sub
{
@@ -178,62 +138,48 @@
return $args->{'sub'};
}
-=head2 $self->find_node_by_coords($coords, $callback)
-
-Finds a node by its coordinations.
-
-=cut
sub find_node_by_coords
{
- my $self = shift;
- my $coords = shift;
- my $callback = shift || (sub { });
+ my $self = shift;
+ my $coords = shift;
+ my $callback = shift || ( sub { } );
- my $idx = 0;
- my $item =
- $self->get_new_item(
- {
- 'node' => $self->get_initial_node(),
- }
- );
+ my $idx = 0;
+ my $item = $self->get_new_item(
+ {
+ 'node' => $self->get_initial_node(),
+ }
+ );
- my $internal_callback =
- sub {
- $callback->(
- 'idx' => $idx,
- 'item' => $item,
- 'self' => $self,
- );
- };
+ my $internal_callback = sub {
+ $callback->(
+ 'idx' => $idx,
+ 'item' => $item,
+ 'self' => $self,
+ );
+ };
$internal_callback->();
foreach my $c (@$coords)
{
- $item =
- $self->get_new_item(
- {
- 'node' =>
- $self->get_node_from_sub(
- {
- 'item' => $item,
- 'sub' => $item->_get_sub($c),
- }
- ),
- 'parent_item' => $item,
- }
- );
+ $item = $self->get_new_item(
+ {
+ 'node' => $self->get_node_from_sub(
+ {
+ 'item' => $item,
+ 'sub' => $item->_get_sub($c),
+ }
+ ),
+ 'parent_item' => $item,
+ }
+ );
$idx++;
$internal_callback->();
}
return +{ 'item' => $item, };
}
-=head2 $self->get_coords()
-
-Returns the current coordinates of the object.
-
-=cut
sub get_coords
{
@@ -242,13 +188,196 @@
return $self->coords();
}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+HTML::Widgets::NavMenu::Tree::Iterator - an iterator for HTML.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 SYNOPSIS
+
+For internal use only.
+
+=head1 VERSION
+
+version 1.0704
+
+=head1 METHODS
+
+=head2 coords
+
+Internal use.
+
+=head2 stack
+
+Internal use.
+
+=head2 $self->top()
+
+Retrieves the stack top item.
+
+=head2 $self->get_new_item({'node' => $node, 'parent_item' => $parent})
+
+Gets the new item.
+
+=head2 $self->traverse()
+
+Traverses the tree.
+
+=head2 $self->get_node_from_sub()
+
+This function can be overridden to generate a node from the sub-nodes
+returned by get_node_subs() in a different way than the default.
+
+=head2 $self->find_node_by_coords($coords, $callback)
+
+Finds a node by its coordinations.
+
+=head2 $self->get_coords()
+
+Returns the current coordinates of the object.
+
=head1 COPYRIGHT & LICENSE
Copyright 2006 Shlomi Fish, all rights reserved.
This program is released under the following license: MIT X11.
-=cut
+=head1 AUTHOR
-1;
+Shlomi Fish
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2014 by Shlomi Fish.
+
+This is free software, licensed under:
+
+ The MIT (X11) License
+
+=head1 BUGS
+
+Please report any bugs or feature requests on the bugtracker website
+L
+
+When submitting a bug or request, please include a test-file or a
+patch to an existing test-file that illustrates the bug or desired
+feature.
+
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
+
+=head1 SUPPORT
+
+=head2 Perldoc
+
+You can find documentation for this module with the perldoc command.
+ perldoc HTML::Widgets::NavMenu::Tree::Iterator
+
+=head2 Websites
+
+The following websites have more information about this module, and may be of help to you. As always,
+in addition to those websites please use your favorite search engine to discover more resources.
+
+=over 4
+
+=item *
+
+MetaCPAN
+
+A modern, open-source CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+Search CPAN
+
+The default CPAN search engine, useful to view POD in HTML format.
+
+L
+
+=item *
+
+RT: CPAN's Bug Tracker
+
+The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
+
+L