[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] Load_tmpl() minimal clean-up patch.


At 08:41 AM 4/9/2004, Emanuele Zeppieri wrote:
3.
In the boolean expression:

$extra_params[$x] eq 'path' and
ref $extra_params[$x+1]     and
ref $extra_params[$x+1] eq 'ARRAY'

the 2nd predicate is /implied/ by the 3rd, so it's unnecessary and can
be removed (redundancy often decrease legibility, it does not increase it.)

I'm not 100% sure, but I'd say it's not as much implied as it is a prerequisite. Before you check to see if what is returned by ref is 'ARRAY', you make sure that ref really returns something first. I don't know if it's even possible, but if ref returns undef, then you'll get a warning about using an uninitialized value when you compare it to 'ARRAY'.


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.