#use JSON;
use IO::Socket::INET;
use Regexp::Common qw/net/;
-use YAML;
our $title;
} elsif ( $path =~ m{^/store/query} ) {
print $client ok
+ , qq|
+<style type=text/css>
+ .z {
+ background: #eee;
+ }
+ td > pre {
+ margin: 0;
+ max-height: 3em;
+ overflow: hidden;
+ }
+ td:hover > pre {
+ max-height: 100%;
+ overflow: show;
+ }
+</style>
+ |
, qq|<table>|
;
- my ( $s1,$s2 ) = ( ' style="background: #eee"', '' );
+ my ( $s1,$s2 ) = ( ' class=z', '' );
store::query( sub {
my $o = shift;
my $p = delete( $o->{package} );
# XXX sigh, dump dies if we don't do this
delete $o->{$_} foreach ( grep { ! defined $o->{$_} } keys %$o );
- print $client qq|<tr$s1><td>|, join(qq|</td><td>|, map { $p->{$_} } keys %$p ), qq|</td><td><pre>|, dump( $o ), qq|</pre></td></tr>\n|;
+ print $client qq|<tr$s1><td>|
+ , join(qq|</td><td>|, map { $p->{$_} } keys %$p )
+ , qq|</td><td><pre>|
+ , dump( $o )
+ , qq|</pre></td></tr>\n|
+ ;
( $s1, $s2 ) = ( $s2, $s1 );
});
print $client qq|</table>|;