150 |
|
|
151 |
sub _get_rec { $rec }; |
sub _get_rec { $rec }; |
152 |
|
|
153 |
|
sub rec_array { |
154 |
|
my $d = $rec->{ $_[0] }; |
155 |
|
return @$d if ref($d) eq 'ARRAY'; |
156 |
|
die "field $_[0] not array: ",dump( $d ); |
157 |
|
} |
158 |
|
|
159 |
=head2 _set_config |
=head2 _set_config |
160 |
|
|
161 |
Set current config hash |
Set current config hash |
352 |
|
|
353 |
sub sorted { to( 'sorted', @_ ) } |
sub sorted { to( 'sorted', @_ ) } |
354 |
|
|
355 |
|
=head2 row |
356 |
|
|
357 |
|
Insert new row of data into output module |
358 |
|
|
359 |
|
row( column => 'foo', column2 => 'bar' ); |
360 |
|
|
361 |
|
=cut |
362 |
|
|
363 |
|
use Data::Dump qw/dump/; |
364 |
|
|
365 |
|
sub row { |
366 |
|
die "array doesn't have even number of elements but $#_: ",dump( @_ ) if $#_ % 2 != 1; |
367 |
|
|
368 |
|
push @{ $out->{'_rows'} }, {@_}; |
369 |
|
} |
370 |
|
|
371 |
|
|
372 |
=head1 Functions to extract data from input |
=head1 Functions to extract data from input |
373 |
|
|