Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: affc2e8674
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (18 sloc) 0.517 kb
package Angelos::ORM::DBIC::AutoStoreDateTime;
use strict;
use warnings;
use base 'DBIx::Class';
# steal from MoFedge::Data::DBIC::AutoStoreDataTime
sub insert {
my $self = shift;
$self->store_column( 'created_on', $self->datetime->now )
if $self->result_source->has_column('created_on');
$self->next::method(@_);
}
sub update {
my $self = shift;
$self->updated_on( $self->datetime->now )
if $self->result_source->has_column('updated_on');
$self->next::method(@_);
}
1;
Jump to Line
Something went wrong with that request. Please try again.