abw / Template2

Perl Template Toolkit v2
http://template-toolkit.org/
146 stars 94 forks source link

Consider updating to Perl 5.10 #308

Open petdance opened 1 year ago

petdance commented 1 year ago

Is there any interest in bumping up the minimum Perl for TT to 5.10.1 which came out in 2009?

There are many places we could use defined-or for simplicity and speed. For example, Template::VMethods::list_join would go from

join(defined $joint ? $joint : ' ',
    map { defined $_ ? $_ : '' } @$list);

to

join($joint//'', map { $_//'' } @$list);

There are probably places we could take advantage of state as well. Probably less so with say.

nicolasfranck commented 3 months ago

That seems reasonable; and nothing stops client code from setting their dependencies to a fixed version. Perl modules however have a poor habit of setting MyDep >= 2.0 without knowing if that statement will always be true (ruby modules use ~>version to indicate "greater or equal to, but not beyond a major version"). Major version numbers often have breaking changes.

But knowing that perl 5.10 is ancient (and has it's own problems), I would feel no regret in doing so.