http://www.perlmonks.org?node_id=1015206


in reply to Can't call method "MoveBook" on an undefined value

You have a lot of options: BUILD, BUILDARGS, or possibly even "lazy => ..., builder => ..."

At first blush I would say it could be a job for a BUILD routine, but would prefer to see more before saying for certain. If possible I would favor doing it in the attribute's declaration (again, possibly builder).

See Moose::Manual::Construction, and Moose::Manual::Attributes for more explanation.


Dave