7 use Data::Dump qw/dump/;
13 ( undef, $command ) = @_;
18 my ( $self, $key ) = @_;
20 warn "command $command key $key";
28 open(my $brctl, '-|', $command);
33 $split_re = qr/\t+/ if m/\t/;
34 $split_re ||= qr/\s+/ if m/\s/;
37 my @cols = split( $split_re, $_);
41 $info->{_header} = [ @header ] if $key;
45 my $hash = { map { ( $header[$_] => $cols[$_] ) } 0 .. $#cols } ;
48 my $k = $cols[$key - 1];
50 store::audit( $command, $k, $hash );
57 warn $command, ' ', dump( $info );
62 sub hash_by { lines(@_) }