develooper Front page | perl.moose | Postings from February 2009

Attribute reset

Thread Next
From:
Matthew Persico
Date:
February 4, 2009 21:40
Subject:
Attribute reset
Message ID:
9ea6aaa80902042140q595cfe9bm50fb1621ef0f0224@mail.gmail.com
given this fragment

has 'mylist' => (isa => 'ArrayRef', default => sub { [] });

at a point in my code later on I want to clear it to reset it so I do

$self->mylist([]);

Is there anyway I could invoke the default? Something like

$self->mylist()->default();

Thanks


-- 
Matthew O. Persico

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About