Add assetId attribute to Asset.pm, and tests.

This commit is contained in:
Colin Kuskie 2009-12-30 08:35:21 -08:00
parent f76842f705
commit 38144bd58f
2 changed files with 13 additions and 3 deletions

View file

@ -236,6 +236,12 @@ property assetSize => (
);
has session => (
is => 'ro',
required => 1,
);
has assetId => (
is => 'ro',
lazy => 1,
default => sub { shift->session->id->generate() },
);
around BUILDARGS => sub {
@ -1054,7 +1060,7 @@ Returns the assetId of an Asset.
sub getId {
my $self = shift;
return $self->get("assetId");
return $self->assetId;
}
#-------------------------------------------------------------------