< Programming with Moose < Difficulties
After using Moose for a while you will eventually find yourself with an assortment of classes that you wish to reuse. Unfortunately, Moose won't make it all that easy to use those Moose classes from within Moose. Here are some difficult tasks to do within Moose:
In these examples, MooseObj, is a Moose object.
- isa => ArrayRef[ MooseObj ]
- There is no syntactic sugar to facilitate in creating MooseObj(s).
- Not easily possible to coerce from
$self->MooseObj( [{constructor_args1}, {constructor_args2}] )
.
- isa => 'MooseObj'
- No syntactic Autoboxing of the MooseObj, you can't do the following:
$self->foo->new( {constructor_args} )
. - No implicit way to bypass the creation of MooseObj and set its accessors. more on this in One-to-one Auto-vivification.
- No syntactic Autoboxing of the MooseObj, you can't do the following:
YOUR WELCOME----------------------------------------------------------------NO PROBLEM
YOU HAVE BEEN HACKED
HEY FOLLOW @TIBS_IS_HERE ON INSTAGRAM PLEASE.
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.