yes $o->check() returns 0 or 1, but in most of the cases it is too long i.e. parameter passed to it
too long? so? that's fine, or bundle the params into a hash, or store in the object:
if( ! $obj->check(
blah => 1,
stuff => 2,
foo => 'bar',
...
)){
...
}
my %params = (
blah => 1,
stuff => 2,
foo => 'bar',
...
)
if( ! $obj->check(%params) ){
...
}
$obj->blah(1);
$obj->stuff(2);
$obj->foo('bar');
...
if( ! $obj->check() ){
...
}
|