in reply to Best way to handle small changes to subroutines
Sometimes the simplest code is still hairy.
You might be able to benefit from callbacks, e.g. changing
to something likesub render { my ($self, $obj) = @_; ... ... if (...) { ... } else { ... } ... ... }
sub render { my ($self, $obj) = @_; ... ... $obj->render_foo(...) ... ... }
|
|---|