1 package # hide from PAUSE
4 BEGIN { unshift @INC, './t/testlib'; }
8 use Time::Piece::MySQL;
11 __PACKAGE__->set_table();
12 __PACKAGE__->columns(All => qw/id message datetime_stamp/);
14 datetime_stamp => 'Time::Piece',
15 inflate => 'from_mysql_datetime',
16 deflate => 'mysql_datetime'
19 __PACKAGE__->add_trigger(before_create => \&set_dts);
20 __PACKAGE__->add_trigger(before_update => \&set_dts);
23 shift->datetime_stamp(
24 POSIX::strftime('%Y-%m-%d %H:%M:%S', localtime(time)));
29 id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
31 datetime_stamp DATETIME