in reply to OO perl query
One approach that works pretty well is to have a wrapper function, that can call the functional code. Like:
This doesn't work as well if you want to do stuff with the object variables, more than pass them into functions, but it's a reasonable way to abstract something in transition. Later, if you manage to deprecate the functional subroutine, you can put all the code back into the object method without having to change the interface.sub oo_generate { my $self = shift; return func_generate(@_); } sub func_generate { my ($i, $j, $and_other_bad_variable_names) = @_; ... }
-- Kirby, WhitePages.com
|
|---|