On 8/12/22 18:11, Mark Murawski wrote:
On 8/4/22 15:10, demerphq wrote:
On Thu, 4 Aug 2022 at 17:04, Mark Murawski
<markm-li...@intellasoft.net> wrote:
On 8/4/22 02:50, demerphq wrote:
On Thu, 4 Aug 2022 at 01:58, Mark Murawski
<markm-li...@intellasoft.net> wrote:
I'm still not getting something... if I want to fix the
code-as-is and do this:
FNsv = get_sv("main::_FN", GV_ADD);
if (!FNsv)
ereport(ERROR,
(errcode(ERRCODE_EXTERNAL_ROUTINE_EXCEPTION),
errmsg("couldn't fetch $_FN")));
save_item(FNsv); /* local $_FN */
I dont get the sequence here. You take the old value of
$main::_FN and then you localize it after you fetch it? That
seems weird.
You did not respond to this comment ^^
The reason for the save_item*( was because I was modeling this code on
another section that uses save_item() to accomplish something similar
(to send internal postgres details to some perl). I don't know why
the original author uses save_item() for this purpose.
Oh... I know why save_item is used. It's because this code can be
executed multiple times in the same perl process. So each one needs
it's own _FN