use base 'Intranet::DBI';
__PACKAGE__->table('noc_schedule');
__PACKAGE__->columns(Primary => qw/id/);
__PACKAGE__->columns(Essential => qw/
caption
starts
ends
active
locked
monday
tuesday
wednesday
thursday
friday
saturday
sunday
holiday
last_modified
/);
####
unless (@errors) {
my $shift = $self->retrieve($args->{'id'});
print "DEBUG(before update): ",Dumper($shift),"
\n";
$shift->caption($args->{'caption'});
$shift->starts($args->{'starts'});
$shift->ends($args->{'ends'});
$shift->monday($args->{'monday'});
$shift->tuesday($args->{'tuesday'});
$shift->wednesday($args->{'wednesday'});
$shift->thursday($args->{'thursday'});
$shift->friday($args->{'friday'});
$shift->saturday($args->{'saturday'});
$shift->sunday($args->{'sunday'});
$shift->holiday($args->{'holiday'});
print "DEBUG(while update): ",Dumper($shift),"
\n";
$shift->update;
print "DEBUG(after update): ",Dumper($shift),"
\n";
}
####
DEBUG(before update): $VAR1 = bless( { 'holiday' => '16', 'sunday' => '16', 'locked' => '0', 'friday' => '18', 'last_modified' => '20040311080038', 'active' => '0', 'tuesday' => '18', 'monday' => '18', 'ends' => '22:59:00', 'starts' => '22:58:00', 'caption' => 'Copy of Other', 'saturday' => '16', 'wednesday' => '18', 'thursday' => '18', 'id' => '21' }, 'Intranet::NOC::Shift' );
DEBUG(while update): $VAR1 = bless( { 'holiday' => '16', 'sunday' => '16', 'locked' => '0', 'friday' => '18', 'last_modified' => '20040311080038', 'active' => '0', 'tuesday' => '18', 'monday' => '18', 'ends' => '15:00:00', 'starts' => '13:00:00', 'caption' => 'test', 'saturday' => '16', 'wednesday' => '18', 'thursday' => '18', '__Changed' => { 'holiday' => 1, 'sunday' => 1, 'starts' => 1, 'caption' => 1, 'saturday' => 1, 'friday' => 1, 'wednesday' => 1, 'thursday' => 1, 'tuesday' => 1, 'monday' => 1, 'ends' => 1 }, 'id' => '21' }, 'Intranet::NOC::Shift' );
DEBUG(after update): $VAR1 = bless( { 'locked' => '0', 'last_modified' => '20040311080038', 'active' => '0', 'id' => '21' }, 'Intranet::NOC::Shift' );