Re: Moo, multiple-inheritance, unexpectedly uninitialized attributes
[email protected] (Diab Jerius) Thu, 26 Mar 2015 20:17:22 -0400
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <CADpyd5BUbs5NvigKBjeirRbp5S8w1S9TTEhAenD-Phj7OC1Vrw@mail.gmail.com> |
One step at a time... On Thu, Mar 26, 2015 at 8:03 PM, Jim Bacon <[email protected]> wrote: > I would think that you would want to get rid of the multiple inheritance if > possible by making one them a role unless refactoring to that extent is not > possible. > > Jim > > On Mar 26, 2015, at 3:35 PM, Kent Fredric <[email protected]> wrote: > > > On 27 March 2015 at 11:23, Diab Jerius <[email protected]> wrote: >> >> >> $ perl tst2 >> b1 >> Use of uninitialized value in say at tst2 line 30. >> >> In tst2, if I explicitly initialize the attribute from the second class: >> >> my $q = C11->new( b2 => 'BBB' ); >> >> It is still output as uninitialized. >> >> Would someone please point out what I'm missing? >> >> Thanks, >> >> Diab > > > > Seems if you make your accessors lazy, then it works. > > Which implies something is weird in construction. > > > -- > Kent > > KENTNL - https://metacpan.org/author/KENTNL > >