The Room Do I dare disturb the universe?

State = Behavior

State != Behavior Ovid has discovered another “bug” (and by “bug” I mean documented feature ;) ). He has code that effectively does: class MyClass { has my_method => ( default => 1); } and then is surprised when MyClass->new->my_method fails. In his case it was hidden by an inheritance hierarchy. This bites many people new to ... Read more

The Stability Of Abstract Layers

The Stability of Abstract Layers One of the reasons that Moose really works is that it’s a layer of abstractions. At the bottom you have Perl’s native OO layer which is … let’s be charitable and say “bare bones”. On top of that Stevan wrote Class::MOP which standardizes the lower layer, cleans up the edge cases, implements some best practices, a... Read more

A Little Quiz

A Little Quiz This is hypothetical so don’t read too deeply into it. Let’s say you’re walking across town carrying some heavy bags. Let’s also say that you’re walking in front of a bicycle shop and the owner is out front sweeping. Let’s say that the owner offers to give you one of his cheaper bicycles for free because (he says) he’s been in your... Read more

Classes Vs. Roles

Classes Vs. Roles Ovid recently asked if there was ever a reason to use Inheritance over Composition. Stevan answered that question rather eloquently but the whole thing has me thinking about the relationship between Classes and Roles. Object Orientation has no bearing on the real world. It’s framework for building metaphors that hopefully help... Read more

Mutant Weasels

Mutant Weasels I was reading a blog post recently that mentioned the Dawkins Weasel program. I have always wanted to play around with Genetic Algorithms and this one seemed simple enough to hack at for a few hours. Four hours later I think I have something that can illustrate Modern Moose nicely ( Spacecataz this is specifically for you, seduce ... Read more