in reply to subclassing Math::Vector::Real with MooseX::NonMoose
Firstly, Moose defaults to instances being blessed hashes; MVR seems to used blessed arrayrefs. So use MooseX::NonMoose::InsideOut instead of plain MooseX::NonMoose.
Secondly, you probably want to write a FOREIGNBUILDARGS method for your class. This translates the arguments passed to your class' constructor into a list of argument that the parent class' constructor expects.
Lastly, if you want to use this V function, then you'll need to import it into each namespace where you're using it:
use Math::Vector::Real qw(V);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: subclassing Math::Vector::Real with MooseX::NonMoose
by docdurdee (Scribe) on Sep 12, 2013 at 15:52 UTC |