http://www.perlmonks.org?node_id=267613


in reply to chaining method calls

i'm a fan. it makes client interfaces easy to implement. and since i haven't seen it mentioned in this thread, i thought you might find Want of interest. context is everything!

use Want; sub foo { my( $self, @args )= @_; $self->munge(@args); return $self if want('OBJECT'); return @args; }

~Particle *accelerates*