[dancer-users] Recent Perl 5.8 compatibility breakage: mro

Fabrice Gabolde fabrice.gabolde at gmail.com
Thu Sep 18 09:36:53 BST 2014

On Tue, Sep 16, 2014 at 4:58 PM, Yanick Champoux
<yanick at 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/Dancer-1.3125/
>> 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

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

More information about the dancer-users mailing list