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

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


-----Original Message-----
From: Greg Marr [mailto:suppressed 
Sent: Saturday, April 10, 2004 10:07 PM
To: suppressed
Subject: Re: [cgiapp] Load_tmpl() minimal clean-up patch.

> 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'.

No, ref can't return undef.
>From Perlfunc:

	ref EXPR
	ref
	Returns a non-empty string if EXPR is a reference,
	the empty string otherwise.

(Actually, ref does not return undef even when called on undef.)

The 2nd test is therefore unnecessary in any case, so it can be safely
removed (though it's nothing important of course, but since we strive
for prefection... ;-)

Cheers,
Emanuele.





---------------------------------------------------------------------
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.