summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-19 23:46:47 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-19 23:46:47 +0000
commit36a01425aafa63c398750f2bb4e4ba62e204e0ce (patch)
treee09e419d35f96362f0a5a94d2b46e8cf58dd1528
parentac39ad1278696b1b0e60d249abb1c5456a67b9ac (diff)
downloaddrakx-36a01425aafa63c398750f2bb4e4ba62e204e0ce.tar
drakx-36a01425aafa63c398750f2bb4e4ba62e204e0ce.tar.gz
drakx-36a01425aafa63c398750f2bb4e4ba62e204e0ce.tar.bz2
drakx-36a01425aafa63c398750f2bb4e4ba62e204e0ce.tar.xz
drakx-36a01425aafa63c398750f2bb4e4ba62e204e0ce.zip
reduce "Use of uninitialized value" in a heavy used place
(useful when debugging)
-rw-r--r--perl-install/interactive_gtk.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index 6717d0149..4a4504997 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -151,13 +151,15 @@ sub create_ctree {
my ($e, $may_go_to_next, $changed, $double_click, $tree_expanded) = @_;
my @l = map { may_apply($e->{format}, $_) } @{$e->{list}};
+ $tree_expanded = to_bool($tree_expanded); #- to reduce "Use of uninitialized value", especially when debugging
+
my $sep = quotemeta $e->{separator};
my $tree = Gtk::CTree->new(1, 0);
my (%wtree, %wleaves, $size, $selected_via_click);
my $parent; $parent = sub {
if (my $w = $wtree{"$_[0]$e->{separator}"}) { return $w }
- my $s;
+ my $s = '';
foreach (split $sep, $_[0]) {
$wtree{"$s$_$e->{separator}"} ||=
$tree->insert_node($s ? $parent->($s) : undef, undef, [$_], 5, (undef) x 4, 0, $tree_expanded);