in reply to Is it ok to mix functional and oo programming in one package?

If you don't need to store all the parameters why would you want to make it an object? And if you always need the parameters why would you want to make it functional?

I've never had that issue, but i've never had code that could go either way. If I did, then I think i would make it OO and then users who wanted to use it without storing parameters in the object could build an object with no parameters and call its methods passing all information.

my $house = new House(width=>100, height => 100); $house->sweep; # or my $blank = new House; $blank->sweep(width=>100, height => 100); # or even House->new->sweep(width=>100, height => 100);

Either way make sure that your new isn't an expensive method and it shouldn't matter alot.


___________
Eric Hodges