Skip to content
Snippets Groups Projects
  • Tom Lane's avatar
    cc510d97
    Add semicolons to eval'd strings to hide a minor Perl behavioral change. · cc510d97
    Tom Lane authored
    "eval q{foo}" used to complain that the error was on line 2 of the eval'd
    string, because eval internally tacked on "\n;" so that the end of the
    erroneous command was indeed on line 2.  But as of Perl 5.18 it more
    sanely says that the error is on line 1.  To avoid Perl-version-dependent
    regression test results, use "eval q{foo;}" instead in the two places
    where this matters.  Per buildfarm.
    
    Since people might try to use newer Perl versions with older PG releases,
    back-patch as far as 9.0 where these test cases were added.
    cc510d97
    History
    Add semicolons to eval'd strings to hide a minor Perl behavioral change.
    Tom Lane authored
    "eval q{foo}" used to complain that the error was on line 2 of the eval'd
    string, because eval internally tacked on "\n;" so that the end of the
    erroneous command was indeed on line 2.  But as of Perl 5.18 it more
    sanely says that the error is on line 1.  To avoid Perl-version-dependent
    regression test results, use "eval q{foo;}" instead in the two places
    where this matters.  Per buildfarm.
    
    Since people might try to use newer Perl versions with older PG releases,
    back-patch as far as 9.0 where these test cases were added.
plperl.sql 12.66 KiB