PL_stashcache, or, what's our minimum Perl version?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@postgreSQL.org
Date: 2017-07-28T02:48:35Z
Lists: pgsql-hackers
I wanted to do some portability testing on the recently-proposed plperl changes, so I tried to build against a 5.8.0 Perl that I had laying about. It blew up real good: plperl.c: In function `plperl_trusted_init': plperl.c:1017: `PL_stashcache' undeclared (first use in this function) plperl.c:1017: (Each undeclared identifier is reported only once plperl.c:1017: for each function it appears in.) make: *** [plperl.o] Error 1 It's complaining about this: /* invalidate assorted caches */ ++PL_sub_generation; hv_clear(PL_stashcache); which was introduced by you in commit 1f474d299 (2010-05-13). Some digging suggests that PL_stashcache was added in Perl 5.8.1 circa 2003, although this is impressively underdocumented in any Perl changelog that I could find. So the question is, does anyone care? I wouldn't except that our documentation appears to claim that we work with Perl "5.8 or later". And the lack of field complaints suggests strongly that nobody else cares. So I'm inclined to think we just need to be more specific about the minimum Perl version --- but what exactly? Alternatively, can we make this work with 5.8.0? It looks like PL_stashcache is a macro, so we could make it compile with an "#ifdef PL_stashcache", but I'm pretty nervous about whether that would be breaking needed cleanup behavior. regards, tom lane
Commits
-
Adjust configure to insist on Perl version >= 5.8.3.
- 92e6a98c3636 15.0 landed
-
Further improve consistency of configure's program searching.
- b21c569cea58 10.0 landed
-
Doc: specify that the minimum supported version of Perl is 5.8.3.
- dea6ba939fd2 10.0 landed
- d6f87a23d016 9.5.8 landed
- c522b52d3cf2 9.2.22 landed
- 3bf894feebcb 9.3.18 landed
- 3521131cb120 9.6.4 landed
- 23c20e83d681 9.4.13 landed
-
Record full paths of programs sought by "configure".
- 40b9f192170a 10.0 landed
-
Abandon the use of Perl's Safe.pm to enforce restrictions in plperl, as it is
- 1f474d299d02 9.0.0 cited