Moose Archives

Are Abilities Roles?

In my last post I started out modeling D&D characters with Moose to examine how roles could be applied

I ended with very little code written before I had to make a decision on using my first role or to use more traditional object extension.

Now, Looking at 'abilities' they all have the same set of common attributes, (I will just use a few)

  • name

  • initial value

  • current value

So to make this a class we would just do this

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations