in reply to search methods as class methods?
use YourModule; my $obj = YourModule->new(); my @result = $obj->search($params)
Then it's useful to offer ->search as a class method.
If however there are a few parameters to ->new() or some other state information is added between the calls to new and search then I wouldn't go through all the trouble of making these informations available as extra parameters to a class method search.
So don't go through the trouble of changing your interface because you read somewhere that it might be better that way. Only do that if you understand the concept, and you're convinced that it's actually better.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: search methods as class methods?
by Boldra (Curate) on Mar 02, 2009 at 11:01 UTC |