in reply to Re^2: deep usage of if-else!!
in thread deep usage of if-else!!
yes $o->check() returns 0 or 1, but in most of the cases it is too long i.e. parameter passed to ittoo 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() ){ ... }
|
|---|