attribute initialisation and after

[email protected] (Dave Howorth)
Newsgroups perl.moose
Organization MRC Laboratory for Molecular Biology
Message-ID <[email protected]>
I wrote a Moose class and the class 'has' an attribute. The attribute
also has an 'after' modifier.

But when I create an object of the class and supply an initial value for
the attribute to the 'new' method, it appears that the 'after' modifier
is not called. It is called if I later access the attribute.

My expectation is that initialisation of an attribute would invoke the
attribute's setter and the modifier, so reality doesn't match my
expectation - is there something that explains why reality is as it is
so I can adjust my expectation?

Cheers, Dave
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.