in reply to How to best pass on the context / wantarray?
DBM::Deep does the following which is inspired by CGI's self_or_default()
My criteria for good software:
It's a method because this allows me to overload how to get to the tied method in either DBM::Deep::Array or DBM::Deep::Hash.sub floober { my $self = shift->_get_self; # Do stuff here with the actual object from tied() as opposed to t +he potentially # blessed item that is tied. }
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to best pass on the context / wantarray?
by Corion (Patriarch) on Mar 27, 2006 at 06:01 UTC | |
by dragonchild (Archbishop) on Mar 27, 2006 at 11:43 UTC | |
by tye (Sage) on Mar 27, 2006 at 16:52 UTC |
In Section
Seekers of Perl Wisdom