in reply to Re^2: calling new inside the same module?
in thread calling new inside the same module?

In addition to what Corion already said, this is an option–

    push @{ $self->{ stored } }, __PACKAGE__->new( $it );

Seems like an odd code design though. The container type is the contained type.

Replies are listed 'Best First'.
Re^4: calling new inside the same module?
by tobyink (Canon) on Nov 26, 2018 at 19:10 UTC

    __PACKAGE__->new() doesn't play as nicely with subclasses. ref($self)->new() is usually what you want.