/[webpac2]/trunk/lib/WebPAC/Normalize.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WebPAC/Normalize.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1118 by dpavlin, Sun Oct 26 15:57:37 2008 UTC revision 1206 by dpavlin, Fri May 29 20:55:54 2009 UTC
# Line 21  our @EXPORT = qw/ Line 21  our @EXPORT = qw/
21          get set          get set
22          count          count
23    
24            row
25            rec_array
26    
27  /;  /;
28    
29  use warnings;  use warnings;
# Line 150  sub _set_ds { Line 153  sub _set_ds {
153    
154  sub _get_rec { $rec };  sub _get_rec { $rec };
155    
156    sub rec_array {
157            my $d = $rec->{ $_[0] };
158            return @$d if ref($d) eq 'ARRAY';
159            die "field $_[0] not array: ",dump( $d );
160    }
161    
162  =head2 _set_config  =head2 _set_config
163    
164  Set current config hash  Set current config hash
# Line 346  Insert into lists which will be automati Line 355  Insert into lists which will be automati
355    
356  sub sorted { to( 'sorted', @_ ) }  sub sorted { to( 'sorted', @_ ) }
357    
358    =head2 row
359    
360    Insert new row of data into output module
361    
362      row( column => 'foo', column2 => 'bar' );
363    
364    =cut
365    
366    use Data::Dump qw/dump/;
367    
368    sub row {
369            die "array doesn't have even number of elements but $#_: ",dump( @_ ) if $#_ % 2 != 1;
370    
371            push @{ $out->{'_rows'} }, {@_};
372    }
373    
374    
375  =head1 Functions to extract data from input  =head1 Functions to extract data from input
376    

Legend:
Removed from v.1118  
changed lines
  Added in v.1206

  ViewVC Help
Powered by ViewVC 1.1.26