Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Conditional inheritance strategy

by kcott (Bishop)
on Oct 27, 2010 at 12:54 UTC ( #867704=note: print w/replies, xml ) Need Help??

in reply to Conditional inheritance strategy

Basically this looks good. Here's a few thoughts and suggestions:

  • Your if-elsif has no else. In this case, handling missing or unknown source (as alluded to by bart) would be appropriate.
  • Consider making the source types case-insensitive.
  • Do you need to pass %args to _init()?
  • You may find it useful to have an _init() in My which calls $self->SUPER::_init().
  • Is there a reason to return $self in list context?

-- Ken

Replies are listed 'Best First'.
Re^2: Conditional inheritance strategy
by citromatik (Curate) on Oct 27, 2010 at 13:04 UTC

    Thanks for your answer.

    As for your specific suggestions, the code I posted is a simplification of the actual code that I have (where most of your thoughts have been addressed). I was interested in possible issues using the strategy.

    Thanks again


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://867704]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2020-07-09 02:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found