/[A3C]/lib/A3C/Record.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 /lib/A3C/Record.pm

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

revision 73 by dpavlin, Tue Apr 1 19:27:06 2008 UTC revision 74 by dpavlin, Fri Apr 11 15:55:03 2008 UTC
# Line 13  Custom Record class for A3C Line 13  Custom Record class for A3C
13    
14  =head2 load_or_create  =head2 load_or_create
15    
16  Perform canonicalization on C<load_or_create>  Perform canonicalization on C<load_or_create> and loads subset of columns
17    (which hopfully are indexes in model for performance reasons).
18    
19  =cut  =cut
20    
# Line 35  sub load_or_create { Line 36  sub load_or_create {
36                  );                  );
37          }          }
38    
39          my ( $id, $msg ) = $self->load_by_cols(%args);          my %load_cols;
40    
41            if ( ref($self) eq 'A3C::Model::Person' ) {
42    
43                    $load_cols{$_} = $args{$_} foreach ( qw/
44                            uid
45                            hrEduPersonUniqueID
46                            mail
47                    / );
48            
49            } else {
50                    %load_cols = %args;
51            }
52    
53            my ( $id, $msg ) = $self->load_by_cols(%load_cols);
54          unless ( $self->id ) {          unless ( $self->id ) {
55                  return $self->create(%args);                  return $self->create(%args);
56          }          }

Legend:
Removed from v.73  
changed lines
  Added in v.74

  ViewVC Help
Powered by ViewVC 1.1.26