Have new make use of BUILDARGS if available to manipulate its arguments.
There should be no check for the existence of BUILDARGS at runtime, the determination should be hard coded at mite compile time.
From Moose::Manual::Construction.
BUILDARGS
The "BUILDARGS" method is called as a class method before an object is
created. It will receive all of the arguments that were passed to
"new()" as-is, and is expected to return a hash reference. This hash
reference will be used to construct the object, so it should contain
keys matching your attributes' names (well, "init_arg"s).
Have
new
make use ofBUILDARGS
if available to manipulate its arguments.There should be no check for the existence of BUILDARGS at runtime, the determination should be hard coded at mite compile time.
From Moose::Manual::Construction.
BUILDARGS The "BUILDARGS" method is called as a class method before an object is created. It will receive all of the arguments that were passed to "new()" as-is, and is expected to return a hash reference. This hash reference will be used to construct the object, so it should contain keys matching your attributes' names (well, "init_arg"s).