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()
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.
}
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.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?