From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | plperl strict mode and associated fixes |
Date: | 2005-08-24 01:12:10 |
Message-ID: | 430BC96A.5080703@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
The attached patch completes (I hope) the work begun by Michael Fuhr in
an earlier unapplied patch, and makes strict mode work as recently
discussed. I moved the embedded strings out of the calling functions
into global macros to try to make the code a little more readable.
Unfortunately we can't have regression tests for this because it relies
on a custom variable class.
Illustration of use:
andrew=# set plperl.use_strict = 'true';
SET
andrew=# create function foo() returns text language plperlu as $$
$foo=1; return 'foo';$$;
ERROR: creation of Perl function failed: Global symbol "$foo" requires
explicit package name at (eval 1) line 1.
andrew=# set plperl.use_strict = 'false';
SET
andrew=# create function foo() returns text language plperlu as $$
$foo=1; return 'foo';$$;
CREATE FUNCTION
cheers
andrew
Attachment | Content-Type | Size |
---|---|---|
plperl-strict.patch | text/x-patch | 7.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-08-24 02:22:28 | Re: PL/Perl regression tests with use_strict |
Previous Message | Bruce Momjian | 2005-08-23 23:38:45 | Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items) |