in reply to Collect prints to a string
use strict; sub print_l_old { return qq|the world is a great place|; } sub print_l{ print print_l_old() . qq| to be.|; } print_l();
Update: Oops, I forgot to mention that your tests will break if you add new stuff like qq| to be.|. The right approach should be to just call the old functions in the new without appending anything and rerun your tests. They should all pass. Then rewrite your tests to match your next version's changes. You should be using a version control system, so you should be able to easily differentiate versions and tag releases along with associated tests.
Celebrate Intellectual Diversity
|
|---|