in reply to Re^3: eval-blocks and Test::Builder
in thread eval-blocks and Test::Builder

A couple of the features that we're working towards are subclassibility and multiple engines. Which means DBM::Deep::Array could be subclassed by something that masquerades as an array using Contextual::Return or some other class that overloads @{}. Why should I prevent that when I prefer to use code that ducktypes $_[0] vs. explicit-types it?

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^5: eval-blocks and Test::Builder
by fergal (Chaplain) on Feb 25, 2006 at 12:35 UTC
    Why should I prevent that...

    Because it leads to lots of debugging and meditations about unexpected pitfalls :)

    Another possibilty is to create DBM::Deep::Array::Tied and bless tied arrays into that and untied into DBM::Deep::Array. Then you get 2 _get_self()s both of which are crystal clear.

      ++ for the suggestion of keeping similar but separate things separate.

      Makeshifts last the longest.