After upgrade to 8.4.1 Perl "my" variables are no longer being seen by
subroutines:
CREATE OR REPLACE FUNCTION global.perl_test()
RETURNS "varchar" AS
$BODY$
my $test="x";
test();
return $test;
sub test {
elog(NOTICE,"X=".$test);
}
$BODY$
language 'plperlu';
Now, "select global.perl_test()" returns "x" but the value is missing from
notice statement. This worked just fine in 8.3, and Perl scoping rules say
'my' variables are visible by subroutines within the same code block. I'm
running Ubuntu Karmic, installed from stock PG repositories. Whats going on
here?
Peter