remote all empty keys on which dump croaks
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 23 Jan 2010 21:00:01 +0000 (21:00 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 23 Jan 2010 21:00:01 +0000 (21:00 +0000)
lib/PXElator/httpd.pm

index 90c6469..ffc072f 100644 (file)
@@ -278,9 +278,10 @@ warn "XXX pids = ", dump( $daemons::pids );
                        my $o = shift;
                        my $p = delete( $o->{package} );
                        delete( $o->{_id} );
+
                        # XXX sigh, dump dies if we don't do this
-                       my $tmp = delete( $o->{param} );
-                       $o->{param} = $tmp if defined $tmp;
+                       delete $o->{$_} foreach ( grep { ! defined $o->{$_} } keys %$o );
+
                        print $client qq|<tr><td>|, join(qq|</td><td>|, map { $p->{$_} } keys %$p ), qq|</td><td><pre>|, dump( $o ), qq|</pre></td></tr>\n|;
                });
                print $client qq|</table>|;