Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-25 Thread Tim Bunce
On Sat, Jan 23, 2010 at 06:40:03PM -0700, Alex Hunsaker wrote: On Sat, Jan 23, 2010 at 16:16, Tim Bunce tim.bu...@pobox.com wrote: On Fri, Jan 22, 2010 at 08:59:10PM -0700, Alex Hunsaker wrote: On Thu, Jan 14, 2010 at 09:07, Tim Bunce tim.bu...@pobox.com wrote: I'd vote for use warnings; as

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-25 Thread Andrew Dunstan
Tim Bunce wrote: FYI I've an updated patch ready but I'll wait till the commitfest has got 'closer' as there's a fair chance a further update will be needed anyway to make a patch that applies cleanly. I want to deal with this today or tomorrow, so don't sit on it, please. cheers

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-25 Thread Tim Bunce
On Mon, Jan 25, 2010 at 11:09:12AM -0500, Andrew Dunstan wrote: Tim Bunce wrote: FYI I've an updated patch ready but I'll wait till the commitfest has got 'closer' as there's a fair chance a further update will be needed anyway to make a patch that applies cleanly. I want to deal with

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-23 Thread David E. Wheeler
On Jan 22, 2010, at 7:59 PM, Alex Hunsaker wrote: $name =~ s/::|'/_/g; # avoid package delimiters + $name =~ s/'/\'/g; Looks to me like ' is already handled in the line above the one you added, no? David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-23 Thread Alex Hunsaker
On Sat, Jan 23, 2010 at 11:30, David E. Wheeler da...@kineticode.com wrote: On Jan 22, 2010, at 7:59 PM, Alex Hunsaker wrote:    $name =~ s/::|'/_/g; # avoid package delimiters +   $name =~ s/'/\'/g; Looks to me like ' is already handled in the line above the one you added, no? Well no, i

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-23 Thread David E. Wheeler
On Jan 23, 2010, at 11:20 AM, Alex Hunsaker wrote: Well no, i suppose we could fix that via: $name =~ s/[:|']/_/g; Im betting that was the intent. Doubtful. In Perl, the package separator is either `::` or `'` (for hysterical reasons). So the original code was replacing any package

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-23 Thread Alex Hunsaker
On Sat, Jan 23, 2010 at 12:42, David E. Wheeler da...@kineticode.com wrote: On Jan 23, 2010, at 11:20 AM, Alex Hunsaker wrote: Well no, i suppose we could fix that via: $name =~ s/[:|']/_/g; Im betting that was the intent. Doubtful. In Perl, the package separator is either `::` or `'` (for

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-23 Thread Tim Bunce
On Fri, Jan 22, 2010 at 08:59:10PM -0700, Alex Hunsaker wrote: On Thu, Jan 14, 2010 at 09:07, Tim Bunce tim.bu...@pobox.com wrote: - Allow (ineffective) use of 'require' in plperl    If the required module is not already loaded then it dies.    So use strict; now works in plperl. [ BTW I

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-23 Thread Andrew Dunstan
Tim Bunce wrote: - } keys %$imports; + } sort keys %$imports; Ok, good. - my $funcsrc; - $funcsrc .= qq[ undef *{'$name'}; *{'$name'} = sub { $BEGIN $prolog $src } ]; - #warn plperl mkfuncsrc: $funcsrc\n; - return $funcsrc; + return qq[ undef *{'$name'}; *{'$name'} =

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-23 Thread Alex Hunsaker
On Sat, Jan 23, 2010 at 16:26, Andrew Dunstan and...@dunslane.net wrote: Tim Bunce wrote: -   } keys %$imports; +   } sort keys %$imports; Ok, good. -   my $funcsrc; -   $funcsrc .= qq[ undef *{'$name'}; *{'$name'} = sub { $BEGIN $prolog $src } ]; -   #warn plperl mkfuncsrc:

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-23 Thread Alex Hunsaker
On Sat, Jan 23, 2010 at 16:16, Tim Bunce tim.bu...@pobox.com wrote: On Fri, Jan 22, 2010 at 08:59:10PM -0700, Alex Hunsaker wrote: On Thu, Jan 14, 2010 at 09:07, Tim Bunce tim.bu...@pobox.com wrote: I'd vote for use warnings; as well. I would to, but sadly it's not that simple. warnings

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-22 Thread Alex Hunsaker
On Thu, Jan 14, 2010 at 09:07, Tim Bunce tim.bu...@pobox.com wrote: - Allow (ineffective) use of 'require' in plperl    If the required module is not already loaded then it dies.    So use strict; now works in plperl. [ BTW I think this is awesome! ] Id vote for use warnings; as well. -

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-14 Thread David E. Wheeler
On Jan 14, 2010, at 8:07 AM, Tim Bunce wrote: - Stored procedure subs are now given names. The names are not visible in ordinary use, but they make tools like Devel::NYTProf and Devel::Cover _much_ more useful. Wasn't this in the previous patch, too? Best, David -- Sent via

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-14 Thread Tim Bunce
On Thu, Jan 14, 2010 at 09:34:42AM -0800, David E. Wheeler wrote: On Jan 14, 2010, at 8:07 AM, Tim Bunce wrote: - Stored procedure subs are now given names. The names are not visible in ordinary use, but they make tools like Devel::NYTProf and Devel::Cover _much_ more useful.

Re: [HACKERS] Miscellaneous changes to plperl [PATCH]

2010-01-14 Thread David Fetter
On Thu, Jan 14, 2010 at 05:49:54PM +, Tim Bunce wrote: On Thu, Jan 14, 2010 at 09:34:42AM -0800, David E. Wheeler wrote: On Jan 14, 2010, at 8:07 AM, Tim Bunce wrote: - Stored procedure subs are now given names. The names are not visible in ordinary use, but they make