Don't ask to ask, just ask | |
PerlMonks |
Re: 'either or' value unit test case in Test::Simple or Test::Moreby shmem (Chancellor) |
on Jan 05, 2007 at 14:48 UTC ( [id://593119]=note: print w/replies, xml ) | Need Help?? |
Use
i.e. make an expression that checks $var1 against both posibilities, and evaluates to either some true or some false value. Don't use
- that is syntax is explicitly discouraged in the docs. Thanks to ikegami for pointing that out via /msg. --shmem update: removed cluttered ternary op suggestion, incorporated ikegami's /msg. _($_=" "x(1<<5)."?\n".q·/)Oo. G°\ / /\_¯/(q / ---------------------------- \__(m.====·.(_("always off the crowd"))."· ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In Section
Seekers of Perl Wisdom
|
|