in reply to How Should I Relate Many Objects Of One Kind To A Single, Common Object Of Another

"The map module is a parent of the rider module"

Why? That seems odd. If you've really done that, then I don't think you understand inheritance.

Animal is the parent of Mammal, because mammals are animals. Mammal is the parent of Cat, because cats are mammals. Pet_Shop is not the parent of Cat, because cats are not pet shops.

Riders don't sound like they are maps, so Map should not be the parent of Rider.

use parent 'Transit::Map';

If you're using Moose, then that's not how you do inheritance. Use the Moose extends keyword.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
  • Comment on Re: How Should I Relate Many Objects Of One Kind To A Single, Common Object Of Another
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: How Should I Relate Many Objects Of One Kind To A Single, Common Object Of Another
by varanasi (Scribe) on May 24, 2012 at 20:36 UTC
    Seemed odd to me, too! I did it this way because it worked, and I couldn't figure out another way to do it.