A Games::World::Thing::Room with a View ...

Ovid on 2005-10-30T00:57:42

I have now added rooms to the world. All items have to be created in a room (or in another item which can hold them) and rooms created are all automatically added to the world. You can now call $world->dump to recursively dump an idented list of everything and its location. Because rooms are a subclass of "thing", this was really easy to make happen. Currently the world displays many behaviors similar to things but since it's a very special kind of thing, trying to have the world subclass from a thing caused some problems.

I really wish Class::Trait worked better. There are some common behaviors which World and Thing share and traits would ease some design issues.

Off to a cartoon Halloween party. I and some friends are going as Shaggy, Velma and Scooby Doo. I'm Shaggy because they both said I'd be perfect for that. Not sure how to take that :)


Instead of Class::Trait, maybe try Perl6::Roles

Stevan on 2005-10-30T02:13:36

Rob Kinyon has started writing a version of roles based on Class::Role and Class::Roles (along with some learnings from my work on the Perl 6 metamodel) which is (possibly) destined for use in DBI 2.0. It should fix all the issues Class::Trait & Class::Role(s) have. You might want to give it a look. Although keep in mind that it is not feature complete, as we are waiting on p6l to clear up some details.

Stevan

Shaggy?

HollyKing on 2005-10-30T03:52:22

I guess that's better than them both thinking you would be better as Velma.