Re: arrays as pl/perl input arguments [PATCH]
David Wheeler <david@kineticode.com>
From: "David E. Wheeler" <david@kineticode.com>
To: "Stephen J. Butler" <stephen.butler@gmail.com>
Cc: Martijn van Oosterhout <kleptog@svana.org>, Alex Hunsaker <badalex@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Alexey Klyukin <alexk@commandprompt.com>, pgsql-hackers@postgresql.org, Andrew Dunstan <andrew@dunslane.net>
Date: 2011-01-14T00:22:31Z
Lists: pgsql-hackers
On Jan 13, 2011, at 4:15 PM, Stephen J. Butler wrote: > Suppose one of these compatibility objects is passed into legacy code > as $_[0]. The problem is that 'ref $_[0]' will return 'Pg::ArrayArg' > instead of what it used to, '' (empty string). Other than that, I > think it performs as people would expect. Well, frankly, since up to this patch you *never* got an ARRAY reference argument, who would be calling `ref` on it anyway? > You could even change 'as_s' to generate the string on the fly as > requested instead of generating both representations at instantiation. Yep. Best, David