1 package # hide from PAUSE
2 DBIx::Class::CDBICompat::Triggers;
11 return $self->create(@_) unless ref $self;
13 $self->call_trigger('before_create');
14 $self->next::method(@_);
15 $self->call_trigger('after_create');
21 $self->call_trigger('before_update');
22 my @to_update = keys %{$self->{_dirty_columns} || {}};
23 return -1 unless @to_update;
24 $self->next::method(@_);
25 $self->call_trigger('after_update');
31 $self->call_trigger('before_delete') if ref $self;
32 $self->next::method(@_);
33 $self->call_trigger('after_delete') if ref $self;
38 my ($self, $column, $value, @rest) = @_;
39 my $vals = { $column => $value };
40 $self->call_trigger("before_set_${column}", $value, $vals);
41 return $self->next::method($column, $vals->{$column});