Recent Perl 5.8 compatibility breakage: mro
A recent update to Dancer apparently introduced a requirement for the 'mro' module, which is a Perl 5.10+ thing according to: http://search.cpan.org/~rjbs/perl-5.20.0/ext/mro/mro.pm I hope this can be fixed. One of the key reasons I chose Dancer is that it still worked on Perl 5.8, which is what RHEL 5 shipped with, which will still be in support for years: http://goo.gl/gUzmww It's too early to be dropping Perl 5.8, IMHO. Yes, I know, Modern Perl, 12 years old, yadda yadda. Perl 5.8 was the current version for over 5 years, so it got itself into a *lot* of places before 5.10 finally came around to displace it.
On 9/15/2014 13:01, Warren Young wrote:
A recent update to Dancer apparently introduced a requirement for the 'mro' module
Forgot to include the cpanm output: # cpanm Dancer --> Working on Dancer Fetching http://www.cpan.org/authors/id/Y/YA/YANICK/Dancer-1.3129.tar.gz ... OK Configuring Dancer-1.3129 ... OK ==> Found dependencies: mro skipping R/RJ/RJBS/perl-5.20.0.tar.gz ! Installing the dependencies failed: Module 'mro' is not installed ! Bailing out the installation for Dancer-1.3129. # cpanm mro skipping R/RJ/RJBS/perl-5.20.0.tar.gz No, cpanm, please don't try to install Perl 5.20 on this old box. Another thought: If there's a desire to push Dancer forward in terms of Perl support, is there a good reason not to keep it on the Dancer2 line? Isn't Dancer1 supposed to be in maintenance mode primarily, nice and stable?
I'm not sure what bits of mro are used in Dancer, but MRO::Compat may work as a drop-in replacement. From the documentation <https://metacpan.org/pod/MRO::Compat#DESCRIPTION>: The "mro" namespace provides several utilities for dealing with method resolution order and method caching in general in Perl 5.9.5 and higher. This module provides those interfaces for earlier versions of Perl (back to 5.6.0 anyways). It is a harmless no-op to use this module on 5.9.5+. That is to say, code which properly uses MRO::Compat <http://search.cpan.org/%7Ebobtfish/MRO-Compat-0.12/lib/MRO/Compat.pm> will work unmodified on both older Perls and 5.9.5+. If you're writing a piece of software that would like to use the parts of 5.9.5+'s mro:: interfaces that are supported here, and you want compatibility with older Perls, this is the module for you. On Mon, Sep 15, 2014 at 1:01 PM, Warren Young <warren@etr-usa.com> wrote:
A recent update to Dancer apparently introduced a requirement for the 'mro' module, which is a Perl 5.10+ thing according to:
http://search.cpan.org/~rjbs/perl-5.20.0/ext/mro/mro.pm
I hope this can be fixed. One of the key reasons I chose Dancer is that it still worked on Perl 5.8, which is what RHEL 5 shipped with, which will still be in support for years: http://goo.gl/gUzmww
It's too early to be dropping Perl 5.8, IMHO. Yes, I know, Modern Perl, 12 years old, yadda yadda. Perl 5.8 was the current version for over 5 years, so it got itself into a *lot* of places before 5.10 finally came around to displace it. _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
When mro was first introduced, MRO::Compat was created for older perls; with any luck, it can be used for Dancer.
On 9/15/2014 13:09, Yitzchak Scott-Thoennes wrote:
When mro was first introduced, MRO::Compat was created for older perls; with any luck, it can be used for Dancer.
This problem appears to be due to t/lib/TestPluginMRO.pm. There isn't a "use mro" anywhere else in the 1.3129 dist tree. Changing the "use mro 'c3'" line to reference MRO::Compat allows it to pass "make test," and it appears to now run. (More testing required.) By walking back through the versions, it appears this breakage was introduced in 1.3126. Unfortunately, there was no announcement on the list for 1.3.126, so I can't guess what change required this.
Opening an issue on Github will be the fastest way to see this resolved. It's easier for us to monitor issues on Github than on the list. If you don't have the time, I'll be happy to open one for you, but then you don't get the credit and our thank you for identifying the problem. :) On Mon, Sep 15, 2014 at 9:33 PM, Warren Young <warren@etr-usa.com> wrote:
On 9/15/2014 13:09, Yitzchak Scott-Thoennes wrote:
When mro was first introduced, MRO::Compat was created for older perls; with any luck, it can be used for Dancer.
This problem appears to be due to t/lib/TestPluginMRO.pm. There isn't a "use mro" anywhere else in the 1.3129 dist tree.
Changing the "use mro 'c3'" line to reference MRO::Compat allows it to pass "make test," and it appears to now run. (More testing required.)
By walking back through the versions, it appears this breakage was introduced in 1.3126. Unfortunately, there was no announcement on the list for 1.3.126, so I can't guess what change required this.
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
On 9/15/2014 13:46, Sawyer X wrote:
Opening an issue on Github will be the fastest way to see this resolved.
On Mon, Sep 15, 2014 at 01:54:28PM -0600, Warren Young wrote:
On 9/15/2014 13:46, Sawyer X wrote:
Opening an issue on Github will be the fastest way to see this resolved.
Patch pushed to devel, will be published in a new release once I reach home tonight. (and yeah, I did terrible things to the pooch there, sorry 'bout that) Joy, `/anick --
On Mon, Sep 15, 2014 at 01:33:07PM -0600, Warren Young wrote:
By walking back through the versions, it appears this breakage was introduced in 1.3126. Unfortunately, there was no announcement on the list for 1.3.126, so I can't guess what change required this.
https://metacpan.org/diff/file?target=YANICK/Dancer-1.3126/&source=YANICK/Da... isn't very helpful in this case, but it's a good place to start when trying to figger out stuff like this. 'git blame' says it appeared in https://github.com/PerlDancer/Dancer/commit/53a8276 which ended up in https://github.com/PerlDancer/Dancer/tree/v1.3120, whose changelog leads us to https://github.com/PerlDancer/Dancer/pull/974. So it's a test to see if stuff works when mro Stuff has been turned on outside Dancer. -- David Cantrell | top google result for "topless karaoke murders" Blessed are the pessimists, for they test their backups
On Tue, Sep 16, 2014 at 01:41:06PM +0100, David Cantrell wrote:
On Mon, Sep 15, 2014 at 01:33:07PM -0600, Warren Young wrote:
By walking back through the versions, it appears this breakage was introduced in 1.3126. Unfortunately, there was no announcement on the list for 1.3.126, so I can't guess what change required this.
https://metacpan.org/diff/file?target=YANICK/Dancer-1.3126/&source=YANICK/Da...
isn't very helpful in this case, but it's a good place to start when trying to figger out stuff like this.
'git blame' says it appeared in https://github.com/PerlDancer/Dancer/commit/53a8276 which ended up in https://github.com/PerlDancer/Dancer/tree/v1.3120, whose changelog leads us to https://github.com/PerlDancer/Dancer/pull/974.
So it's a test to see if stuff works when mro Stuff has been turned on outside Dancer.
Excellent detective work. :-) And yeah, there was this new test, and then I did the massive switch to dzilla. One of the plugins I'm using is AutoPrereqs, and unfortunately a few bogus dependencies slipped in. Apologies for that, and with the release of yesterday, I think things should be alright now. Well, *most* things. There is still issue 1068, where monkeyswitching YAML to YAML::XS proved to cause issues with the new merging of configurations. A fix for that should be issued in the next few days. Joy, `/anick --
On Tue, Sep 16, 2014 at 4:58 PM, Yanick Champoux <yanick@babyl.dyndns.org> wrote:
On Tue, Sep 16, 2014 at 01:41:06PM +0100, David Cantrell wrote:
On Mon, Sep 15, 2014 at 01:33:07PM -0600, Warren Young wrote:
By walking back through the versions, it appears this breakage was introduced in 1.3126. Unfortunately, there was no announcement on the list for 1.3.126, so I can't guess what change required this.
https://metacpan.org/diff/file?target=YANICK/Dancer-1.3126/&source=YANICK/Da...
isn't very helpful in this case, but it's a good place to start when trying to figger out stuff like this.
'git blame' says it appeared in https://github.com/PerlDancer/Dancer/commit/53a8276 which ended up in https://github.com/PerlDancer/Dancer/tree/v1.3120, whose changelog leads us to https://github.com/PerlDancer/Dancer/pull/974.
So it's a test to see if stuff works when mro Stuff has been turned on outside Dancer.
Excellent detective work. :-)
And yeah, there was this new test, and then I did the massive switch to dzilla. One of the plugins I'm using is AutoPrereqs, and unfortunately a few bogus dependencies slipped in. Apologies for that, and with the release of yesterday, I think things should be alright now.
Indeed, excellent detective work. I'd have gotten away with it too, if not for those meddling kids... Just to clarify the MRO thing, I was the one who introduced both files (the TestPluginMRO.pm test lib and the 05b_plugins_and_c3.t test). It's a test to check that GH #974 is correctly implemented. I forget why plugins with C3 were a necessity at the time... it was a request from a coworker of mine and the fix was easy. The way the tests work is, 1. if we can load the TestPluginMRO library, it's a success; 2. if we can't and it's because the mro pragma is not available, we skip the tests; 3. if it's for another reason then the fix is not correct and we fail the tests. Step 2 ensured at the time that we would not penalize users with older installations. Since then Dancer switched to dzil with AutoPrereqs, which is easy to confuse in this sort of situation with optional modules. I note that this already caused a failure on old Perl installations (GH #1062)... because Test::More didn't have "skip" in very old versions :/ Sorry for the mess! -- Fabrice Gabolde
participants (7)
-
David Cantrell -
Fabrice Gabolde -
Maxwell Carey -
Sawyer X -
Warren Young -
Yanick Champoux -
Yitzchak Scott-Thoennes