diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-02-01 21:58:34 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-02-01 21:58:34 -0500 |
commit | 5271ea34d18324a74356e2495823497443e10dc4 (patch) | |
tree | 8000d42f067b9c11bc0c3b1ad382c1c8f249ce6b /demos | |
parent | e975f10c7fedafb815206d7ae80872b60874f26a (diff) | |
download | gtk+-5271ea34d18324a74356e2495823497443e10dc4.tar.gz |
Avoid perl warnings
Apparently, defined is not cool anymore.
Diffstat (limited to 'demos')
-rwxr-xr-x | demos/gtk-demo/geninclude.pl.in | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/demos/gtk-demo/geninclude.pl.in b/demos/gtk-demo/geninclude.pl.in index 592aa98812..5c9351d14c 100755 --- a/demos/gtk-demo/geninclude.pl.in +++ b/demos/gtk-demo/geninclude.pl.in @@ -41,7 +41,7 @@ foreach $href (@demos) { my $do_next = 0; # parent detected - if (defined @parents) { + if (@parents) { foreach $foo (@parents) { if ($foo eq $parent_name) { $do_next = 1; @@ -55,7 +55,7 @@ foreach $href (@demos) { push @parents, $parent_name; - $tmp = (defined @child_arrays)?($#child_arrays + 1):0; + $tmp = (@child_arrays)?($#child_arrays + 1):0; push @child_arrays, "child$tmp"; push @demos, {"name" => "NULL", "title" => $parent_name, "file" => "NULL", @@ -63,7 +63,7 @@ foreach $href (@demos) { } } -if (defined @parents) { +if (@parents) { $i = 0; for ($i = 0; $i <= $#parents; $i++) { $first = 1; @@ -74,7 +74,7 @@ if (defined @parents) { for ($j = 0; $j <= $#demos; $j++) { $href = $demos[$j]; - if (!defined $demos[$j]) { + if (!$demos[$j]) { next; } @@ -106,7 +106,7 @@ if (defined @parents) { } @demos_old; # sort the child arrays -if (defined @child_arrays) { +if (@child_arrays) { for ($i = 0; $i <= $#child_arrays; $i++) { @foo_old = @{$child_arrays[$i]}; @@ -134,7 +134,7 @@ foreach $href (@demos) { print ", \n"; } - if (defined @parents) { + if (@parents) { for ($i = 0; $i <= $#parents; $i++) { if ($parents[$i] eq $href->{title}) { |