in reply to Re^3: Moose from ArrayRef[HashRef] to ArrayRef[Object]
in thread Moose from ArrayRef[HashRef] to ArrayRef[Object]

I tried the two samples.
The second one is the one I like it (because conceptually you don't have to create a type not related to class in the base-class).

Just a little precisation:
Here:
$args{pages} = [ map Page->new($_), @$pages ];

must be:
$args{pages} = [ map Page->new(URL=>$$_{Page}{URL})), @$pages ];


And I have a question:

I have also checked Moose manual:

What "around" is?

around BUILDARGS => sub {

Thank you for your answers.

Replies are listed 'Best First'.
Re^5: Moose from ArrayRef[HashRef] to ArrayRef[Object]
by ikegami (Patriarch) on Feb 24, 2011 at 15:59 UTC