user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [RFC] start depending on Perl 5.10.1+
@ 2019-04-17 22:05 Eric Wong
  2019-04-29  1:54 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2019-04-17 22:05 UTC (permalink / raw)
  To: meta

I mainly want to start using the '//' (defined-or) operator to
simplify code, and Perl 5.10.1 is roughly a decade old at this
point.

"given/when" would've be nice, but it's future is in doubt AFAIK.

I also started using the 'parent' module in WwwHighlight, and
'autodie' in UserContent.pm, both of which were only distributed
with Perl since 5.10.1; and testing with ancient
versions/distros is time-consuming.

Anyways, I think this a small-enough jump to not break any
existing installations, given we already depend on fairly
recent versions of git and Xapian.

Maybe we can use more newish Perl features in the future...
---
 INSTALL                | 2 +-
 lib/PublicInbox/WWW.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/INSTALL b/INSTALL
index 9470d83..b22d848 100644
--- a/INSTALL
+++ b/INSTALL
@@ -22,7 +22,7 @@ public-inbox requires a number of other packages to access its full
 functionality.  The core tools are, of course:
 
 * Git (1.8.0+, 2.6+ for writing v2 repositories)
-* Perl 5.8+
+* Perl 5.10.1+
 * SQLite (needed for Xapian use)
 
 To accept incoming mail into a public inbox, you'll likely want:
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index 6e69001..268c5b8 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -11,7 +11,7 @@
 # - Must not rely on static content
 # - UTF-8 is only for user-content, 7-bit US-ASCII for us
 package PublicInbox::WWW;
-use 5.008;
+use 5.010_001;
 use strict;
 use warnings;
 use bytes (); # only for bytes::length
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RFC] start depending on Perl 5.10.1+
  2019-04-17 22:05 [RFC] start depending on Perl 5.10.1+ Eric Wong
@ 2019-04-29  1:54 ` Eric Wong
  2019-06-02 20:13   ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2019-04-29  1:54 UTC (permalink / raw)
  To: meta

The one minor, (and likely irrelevant) downside to this change
would be any of code which relies on the 'fields' pragma for
pseudo-hash performance benefits is out-of-luck since
pseudo-hashes were removed in Perl 5.9.

Our only use of the 'fields' pragma is from Danga::Socket
(and descendent) classes.  Fwiw, I have never used Perl 5.8 on
public-inbox myself, either.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] start depending on Perl 5.10.1+
  2019-04-29  1:54 ` Eric Wong
@ 2019-06-02 20:13   ` Eric Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Wong @ 2019-06-02 20:13 UTC (permalink / raw)
  To: meta

Eric Wong <e@80x24.org> wrote:
> The one minor, (and likely irrelevant) downside to this change
> would be any of code which relies on the 'fields' pragma for
> pseudo-hash performance benefits is out-of-luck since
> pseudo-hashes were removed in Perl 5.9.
> 
> Our only use of the 'fields' pragma is from Danga::Socket
> (and descendent) classes.  Fwiw, I have never used Perl 5.8 on
> public-inbox myself, either.

Even testing "maint-5.10" or "v5.10.1" from perl.git is proving
challenging.  Changes in the toolchain, cflags missing, Errno.pm
not generated correctly, and some math differences.  The usual
stuff that comes from abandoned branches a reasonably up-to-date
OS (Debian stable).  I wonder if I might have better luck on
CentOS 6 or 7.

At least v5.30.0 and blead seem alright

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-02 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17 22:05 [RFC] start depending on Perl 5.10.1+ Eric Wong
2019-04-29  1:54 ` Eric Wong
2019-06-02 20:13   ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).