Setting delegated attributes in constructors

2018-02-13 Thread Merlyn Kline
I'd like to set delegated attributes in my object constructors (e.g. as below) but this doesn't seem to work. Am I missing something? Merlyn #!/usr/bin/perl package SubClass; use Moose; has thing => ( is => 'rw', isa => 'Int' ); before thing => sub { shift; print "subthing: ", @_ ?

Re: Setting delegated attributes in constructors

2018-02-13 Thread Merlyn Kline
parameters to the object. I think I'll look for a different solution. Or just stick with what I've got now, where I call the accessors immediately after construction. Looks ugly but there you go. Thanks again, Merlyn On Tue, 13 Feb 2018 at 16:18 Harald Jörg <harald.jo...@arcor.de> wrote: &g