Re: [Devel::Cover] return conditions

2004-09-17 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, On Friday 17 September 2004 12:41, [EMAIL PROTECTED] wrote: > Incidentally, the original obfuscated code is pretty damn fast > if you expect to return False most of the time. I bet by removing the return statement it gets even faster: ala: ($one == $tw

Re: [Devel::Cover] return conditions

2004-09-17 Thread Brent . Cowgill
Incidentally, the original obfuscated code is pretty damn fast if you expect to return False most of the time. Rate if_else - (F) space_ship - (F) space_ship (T) ternary - (F) if_else - (T) ret_1_or_ret_0 (T) ternary - (T) ret_1_or_ret_0 (F) (control) (F) (control) (T) i

Re: [Devel::Cover] return conditions

2004-09-17 Thread Dave Cross
On Fri, Sep 17, 2004 at 09:33:39AM +0100, [EMAIL PROTECTED] wrote: > > it's basically a confusing if else > > if ($one == $two) { return 1 } else { return 0 } Or return $one == $two; Dave... -- We are far too young and clever

Re: [Devel::Cover] return conditions

2004-09-17 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, On Friday 17 September 2004 10:56, [EMAIL PROTECTED] wrote: > But that would return '' or 1and presumably the author > wanted zero instead of an empty string. > > Cheers, Brent > On Fri, Sep 17, 2004 at 09:33:39AM +0100, [EMAIL PROTECTED] wrote: > > it's

Re: [Devel::Cover] return conditions

2004-09-17 Thread Brent . Cowgill
[EMAIL PROTECTED] Subject: Re: [Devel::Cover] return conditions

Re: [Devel::Cover] return conditions

2004-09-17 Thread Brent . Cowgill
ject: Re: [Devel::Cover] return conditions

Re: [Devel::Cover] return conditions

2004-09-16 Thread Kevin Scaldeferri
On Sep 16, 2004, at 2:47 PM, Tels wrote: -BEGIN PGP SIGNED MESSAGE- Moin, On Thursday 16 September 2004 23:37, Geoffrey Young wrote: hi paul :) I think this has come up before, but I'm not sure what the resolution was. I just came across (production) code that looks like this: return 1 if

Re: [Devel::Cover] return conditions

2004-09-16 Thread Geoffrey Young
>>> return 1 if $one == $two or return 0; > > > Just FYI: > > I always wonder why someone would write such code. IMHO this is > unmaintainable code. I might not be an Perl expert, but I wouldn't consider > myself a beginner either, especially not at boolean logic. And still, my > mind canno

Re: [Devel::Cover] return conditions

2004-09-16 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, On Thursday 16 September 2004 23:37, Geoffrey Young wrote: > hi paul :) > > I think this has come up before, but I'm not sure what the resolution > was. > > I just came across (production) code that looks like this: > > return 1 if $one == $two or return