in reply to Re: use version confusion
in thread use version confusion

Is there any way to downgrade a recent Perl to an older one? Or do I just have to be really careful not to use features that don't exist on older versions?

Replies are listed 'Best First'.
Re^3: use version confusion
by Anonymous Monk on Jul 06, 2014 at 12:56 UTC

    Test your code at least on the minimum and maximum version of Perl you want to support (and if you want to be thorough, the ones in between too).

    You can easily have different Perl versions installed on your system. See for example perlbrew.

    If by "downgrade" you mean by some kind of option to make a newer Perl behave like an older one, then no, at least not completely: While you can disable features, that won't disable all of the things that the newer Perl supports. Only actually using the older Perl version will give you reliable test results.

Re^3: use version confusion
by AppleFritter (Vicar) on Jul 06, 2014 at 12:37 UTC
    None that I'm aware of (though I'm hardly the most experienced monk in the Monastery, so maybe one of the senior brothers will enlighten me). You'll just have to be careful.
Re^3: use version confusion
by perlfan (Parson) on Jul 07, 2014 at 11:56 UTC
    Just look for deprecation warnings. Perl is excellent at backward compatibility, but if a feature is marked "experimental" or deprecation warnings start appearing, then you might want to pay good attention and refactor your code that relies on these.

    You can also always, test against blead.

Re^3: use version confusion
by jellisii2 (Hermit) on May 12, 2016 at 17:33 UTC
    PerlBrew.