1 |
package WebPAC::Normalize; |
package WebPAC::Normalize; |
2 |
use Exporter 'import'; |
use Exporter 'import'; |
3 |
our @EXPORT = qw/ |
our @EXPORT = qw/ |
4 |
_set_rec _set_lookup |
_set_ds _set_lookup |
5 |
|
get_ds |
6 |
_set_load_row |
_set_load_row |
7 |
_get_ds _clean_ds |
_get_ds _clean_ds |
8 |
_debug |
_debug |
48 |
|
|
49 |
=cut |
=cut |
50 |
|
|
51 |
our $VERSION = '0.31'; |
our $VERSION = '0.32'; |
52 |
|
|
53 |
=head1 SYNOPSIS |
=head1 SYNOPSIS |
54 |
|
|
108 |
|
|
109 |
no strict 'subs'; |
no strict 'subs'; |
110 |
_set_lookup( $arg->{lookup} ) if defined($arg->{lookup}); |
_set_lookup( $arg->{lookup} ) if defined($arg->{lookup}); |
111 |
_set_rec( $arg->{row} ); |
_set_ds( $arg->{row} ); |
112 |
_set_config( $arg->{config} ) if defined($arg->{config}); |
_set_config( $arg->{config} ) if defined($arg->{config}); |
113 |
_clean_ds( %{ $arg } ); |
_clean_ds( %{ $arg } ); |
114 |
$load_row_coderef = $arg->{load_row_coderef}; |
$load_row_coderef = $arg->{load_row_coderef}; |
119 |
return _get_ds(); |
return _get_ds(); |
120 |
} |
} |
121 |
|
|
122 |
=head2 _set_rec |
=head2 _set_ds |
123 |
|
|
124 |
Set current record hash |
Set current record hash |
125 |
|
|
126 |
_set_rec( $rec ); |
_set_ds( $rec ); |
127 |
|
|
128 |
=cut |
=cut |
129 |
|
|
130 |
my $rec; |
my $rec; |
131 |
|
|
132 |
sub _set_rec { |
sub _set_ds { |
133 |
$rec = shift or die "no record hash"; |
$rec = shift or die "no record hash"; |
134 |
} |
} |
135 |
|
|
136 |
|
=head2 get_ds |
137 |
|
|
138 |
|
Access to original record from input module |
139 |
|
|
140 |
|
my $ds = get_rec; |
141 |
|
|
142 |
|
=cut |
143 |
|
|
144 |
|
sub get_ds { |
145 |
|
return $rec; |
146 |
|
} |
147 |
|
|
148 |
=head2 _set_config |
=head2 _set_config |
149 |
|
|
150 |
Set current config hash |
Set current config hash |