On Nov 16, Paul Johnson said:
On Tue, Nov 15, 2005 at 06:48:40PM -0500, Jeff 'japhy' Pinyan wrote:whereas if $_[1] is tainted, then the eval { ... } returns false since a fatal error is raised because eval 1 . substr($_[0], 0, 0) is illegal if $_[0] is tainted.I would be wary of even this solution. The backwards compatibility police would probably catch it, but someone might say that a zero length string could never be tainted and then this code would break.
I would be very annoyed at the person who made that decision.
I would go with Scalar::Util::tainted().
Certainly. And hooray, as of 5.8, Scalar::Util is a core module. Huzzah. -- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 % the cheated, we who for every service http://www.perlmonks.org/ % have long ago been overpaid? http://princeton.pm.org/ % -- Meister Eckhart -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
