/[webpac2]/trunk/lib/WebPAC/Validate.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/Validate.pm

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

revision 767 by dpavlin, Wed Sep 13 17:44:57 2006 UTC revision 768 by dpavlin, Fri Nov 3 19:41:28 2006 UTC
# Line 18  WebPAC::Validate - provide simple valida Line 18  WebPAC::Validate - provide simple valida
18    
19  =head1 VERSION  =head1 VERSION
20    
21  Version 0.09  Version 0.10
22    
23  =cut  =cut
24    
25  our $VERSION = '0.09';  our $VERSION = '0.10';
26    
27  =head1 SYNOPSIS  =head1 SYNOPSIS
28    
# Line 117  sub new { Line 117  sub new {
117          $self ? return $self : return undef;          $self ? return $self : return undef;
118  }  }
119    
120  =head2 validate_errors  =head2 validate_rec
121    
122  Validate record and return errors  Validate record and return errors
123    
124    my @errors = $validate->validate_errors( $rec, $rec_dump );    my @errors = $validate->validate_rec( $rec, $rec_dump );
125    
126  =cut  =cut
127    
128  sub validate_errors {  sub validate_rec {
129          my $self = shift;          my $self = shift;
130    
131          my $log = $self->_get_logger();          my $log = $self->_get_logger();
132    
133          my $rec = shift || $log->logdie("validate_errors need record");          my $rec = shift || $log->logdie("validate_rec need record");
134          my $rec_dump = shift;          my $rec_dump = shift;
135    
136          $log->logdie("rec isn't HASH") unless (ref($rec) eq 'HASH');          $log->logdie("rec isn't HASH") unless (ref($rec) eq 'HASH');

Legend:
Removed from v.767  
changed lines
  Added in v.768

  ViewVC Help
Powered by ViewVC 1.1.26