update method alters the reference it is sent. Fix this by using Clone, which is a grandfathered prerequisite

This commit is contained in:
Colin Kuskie 2008-11-08 19:28:26 +00:00
parent 1ddaa75ab8
commit 5060ec78aa

View file

@ -16,6 +16,7 @@ package WebGUI::Asset;
use Carp qw( croak confess );
use Scalar::Util qw( blessed );
use Clone qw(clone);
use WebGUI::AssetBranch;
use WebGUI::AssetClipboard;
@ -2242,7 +2243,8 @@ to set the keywords for this asset.
sub update {
my $self = shift;
my $properties = shift;
my $requestedProperties = shift;
my $properties = clone($requestedProperties);
$properties->{lastModified} = time();
# if keywords were specified, then let's set them the right way