Use Moose method modifiers for overriding addRev in Story.

This commit is contained in:
Colin Kuskie 2010-03-24 10:25:29 -07:00
parent 82bc730a8a
commit a10e65f883

View file

@ -117,23 +117,16 @@ Request autocommit.
=cut
sub addRevision {
around addRevision => sub {
my $orig = shift;
my $self = shift;
my $session = $self->session;
my $newSelf = $self->next::method(@_);
my $newProperties = {
isHidden => 1,
};
$newSelf->update($newProperties);
my $newSelf = $self->$orig(@_);
my $newPhotoData = $newSelf->duplicatePhotoData;
$newSelf->setPhotoData($newPhotoData);
#$newSelf->requestAutoCommit;
return $newSelf;
}
};
#-------------------------------------------------------------------