Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Programming with Moose/Syntax

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

A big problem with the CPAN docs thus far is they utilize (abuse) the fact that Moose is an application of Class::MOP. Class::MOP is Meta Object Protocol building framework - and that is usually about where the cryptic confusion sets in.. There is a very blurry distinction between Class::MOP and Moose, because Moose is the only known application of Class::MOP. Essentially what we have in Class::MOP is an archive of hacks that allow Moose to be terse and non-pearlish. Moose makes a few of these hacks available with out much sugar but generally speaking candy coats them to a comfortable level. In this syntax compendium of Moose we promise to never mention Class::MOP again.joking Table of Contents Keywords exported with use Moose;: has 75% before, after, around 75% blessed override 00% augment extends 75% with meta Other functions - Non-polluting fully-qualified syntax 25% Use of 'no Moose' 15:32 <@konobi> less shit to track during runtime 15:33 <@Sartak> EvanCarroll: my $person = Person->new; $person->has("jewelry") 15:33 <@konobi> just _having_ stuff in your namespace will slow the interpreter down 15:33 <@Sartak> if you keep Moose's functions in Person's namespace, that will have weird results 15:33 <@Sartak> if you no Moose, then it's the usual "undefined function" error Footnotes joking Class::MOP, last time, I swear.