1 package # hide from PAUSE
2 DBIx::Class::CDBICompat::AutoUpdate;
7 use base qw/Class::Data::Inheritable/;
9 __PACKAGE__->mk_classdata('__AutoCommit');
13 my $ret = $self->next::method(@_);
14 $self->update if ($self->autoupdate && $self->{_in_storage});
21 ? $proto->_obj_autoupdate(@_)
22 : $proto->_class_autoupdate(@_) ;
26 my ($self, $set) = @_;
27 my $class = ref $self;
28 $self->{__AutoCommit} = $set if defined $set;
29 defined $self->{__AutoCommit}
30 ? $self->{__AutoCommit}
31 : $class->_class_autoupdate;
34 sub _class_autoupdate {
35 my ($class, $set) = @_;
36 $class->__AutoCommit($set) if defined $set;
37 return $class->__AutoCommit;