Skip to content

Commit

Permalink
Properly initialize $cur_level variable in WellWell::Menu in order to…
Browse files Browse the repository at this point in the history
… avoid

Perl warnings.
  • Loading branch information
racke committed Sep 11, 2010
1 parent e14efba commit 2a1a471
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/WellWell/Menu.pm
Expand Up @@ -81,6 +81,9 @@ sub build_entries {
$entries_ref = sort_tree_entries($entries_ref);
$cur_level = $entries_ref->[0]->{level};
}
else {
$cur_level = 0;
}

for (my $i = 0; $i < @$entries_ref; $i++) {
$ref = $entries_ref->[$i];
Expand Down

0 comments on commit 2a1a471

Please sign in to comment.