/[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 752 by dpavlin, Sun Oct 8 18:21:26 2006 UTC revision 785 by dpavlin, Wed Dec 6 23:44:36 2006 UTC
# Line 19  use Exporter 'import'; Line 19  use Exporter 'import';
19          save_into_lookup          save_into_lookup
20    
21          split_rec_on          split_rec_on
22    
23            get set
24  /;  /;
25    
26  use warnings;  use warnings;
# Line 39  WebPAC::Normalize - describe normalisato Line 41  WebPAC::Normalize - describe normalisato
41    
42  =head1 VERSION  =head1 VERSION
43    
44  Version 0.23  Version 0.24
45    
46  =cut  =cut
47    
48  our $VERSION = '0.23';  our $VERSION = '0.24';
49    
50  =head1 SYNOPSIS  =head1 SYNOPSIS
51    
# Line 1022  Easy as pie, right? Line 1024  Easy as pie, right?
1024  sub lookup {  sub lookup {
1025          my ($what, $database, $input, $key, $having) = @_;          my ($what, $database, $input, $key, $having) = @_;
1026    
1027          confess "lookup needs 5 arguments: what, database, input, key, having" unless ($#_ == 4);          confess "lookup needs 5 arguments: what, database, input, key, having\n" unless ($#_ == 4);
1028    
1029          warn "## lookup ($database, $input, $key)", $/ if ($debug > 1);          warn "## lookup ($database, $input, $key)", $/ if ($debug > 1);
1030          return unless (defined($lookup->{$database}->{$input}->{$key}));          return unless (defined($lookup->{$database}->{$input}->{$key}));
# Line 1248  sub split_rec_on { Line 1250  sub split_rec_on {
1250          }          }
1251  }  }
1252    
1253    my $hash;
1254    
1255    =head2 set
1256    
1257      set( key => 'value' );
1258    
1259    =cut
1260    
1261    sub set {
1262            my ($k,$v) = @_;
1263            warn "## set ( $k => ", dump($v), " )", $/;
1264            $hash->{$k} = $v;
1265    };
1266    
1267    =head2 get
1268    
1269      get( 'key' );
1270    
1271    =cut
1272    
1273    sub get {
1274            my $k = shift || return;
1275            my $v = $hash->{$k};
1276            warn "## get $k = ", dump( $v ), $/;
1277            return $v;
1278    }
1279    
1280    
1281  # END  # END
1282  1;  1;

Legend:
Removed from v.752  
changed lines
  Added in v.785

  ViewVC Help
Powered by ViewVC 1.1.26