MooseX::TrackDirty::Attributes

[email protected] (Brian ROONEY)
Newsgroups perl.moose
Message-ID <3176460F0F455A44B2E93431E34FC86C2225A66DF0@EXDCVYMBSTM005.EQ1STM.local>
Is there any way to I can take control of MX::TD::A such that I can decide when to start the dirty tracking?  Specifically, below,  the attributes in Foo::Types::Parameter are populated by reading in a file Foo::Reader->read.  Only after reading in, I then want to trigger the dirty tracking.

Currently the dirty tracking starts after construction of Foo::Types::Parameter which means Foo::Reader::File->param->comment  is immediately dirty  when reading from the file. :(


package Foo::Types::Parameter;
use MooseX::TrackDirty::Attributes;
...

has 'comment'    => (isa => 'Bool', traits => [TrackDirty]);
has 'name'            => (isa => 'Str');

=========

package Foo::Reader::File;
...
has 'param' => (isa => ' Foo::Types::Parameter');

sub read {
     ...
     ;# I want to open a file and read some values into $self->param
     ...
     ;# later I want to activate dirty tracking...
}


Thx
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.