[dancer-users] D2 compatibility with Perl 5.8

Darren Duncan darren at darrenduncan.net
Thu Dec 31 22:48:17 GMT 2015


On 2015-12-31 8:29 AM, Warren Young wrote:
> On Dec 31, 2015, at 8:20 AM, Warren Young <wyml at etr-usa.com> wrote:
>>
>> I think we’re either going to have to hold off on D2 for some time, or as you say, try to get the Xslate plugin backported to 5.8.
>
> It turns out that fixing this is a one-liner:
>
>    https://github.com/rsimoes/Dancer2-Template-Xslate/pull/7
>
> A wish to use //= on a single line in the plugin is a pretty silly reason to require Perl 5.10. :)

Indeed.

In my experience, the most common reasons that Perl code would require a version 
over 5.8 is due to wanting to use some new syntactic features such as that, and 
that instead sticking to the syntax 5.8 has would not change the code very much.

There are other, deeper features of Perl versions over 5.8 that make them worth 
upgrading to, but often code incompatibilities aren't due to people needing 
these things, and so for that code it should still support 5.8.

Bottom line, if a Perl module/script you depend on requires a higher Perl 
version number than you have, don't just take that at face value but look into 
it and you may often find that tweaking this module's source is indeed the 
easiest path.

-- Darren Duncan



More information about the dancer-users mailing list