DBIx-DBO2

 view release on metacpan or  search on metacpan

DBO2/Record.pm  view on Meta::CPAN

426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
Inheritable Hook. Subclasses should override this with any functions they wish performed immediately after a row is updated.
 
=back
 
=cut
 
use Class::MakeMethods::Composite::Inheritable(hook=>'ok_update pre_update post_update');
 
# $record->update_record()
sub update_record {
  my $self = shift;
  my $class = ref( $self ) or croak("Not a class method");
  my $table = $class->demand_table();
  my @flags = $self->ok_update;
  if ( grep { length $_ and ! $_ } @flags ) {
    # warn "Cancelling update of $self, flags are " . join(', ', map "'$_'", @flags );
    return undef;
  }
  # warn "About to update $self, flags are " . join(', ', map "'$_'", @flags );
  $self->pre_update();



( run in 0.580 second using v1.01-cache-2.11-cpan-49f99fa48dc )