Skip Menu |
 

This queue is for tickets about the Class-Method-Modifiers CPAN distribution.

Report information
The Basics
Id: 98297
Status: stalled
Priority: 0/
Queue: Class-Method-Modifiers

People
Owner: Nobody in particular
Requestors: maflick88 [...] gmail.com
Cc: ribasushi [...] leporine.io
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Method modifiers don't get applied when overriding modified parent methods
Date: Mon, 25 Aug 2014 00:15:47 +0200
To: bug-Class-Method-Modifiers [...] rt.cpan.org
From: Mark Flickinger <maflick88 [...] gmail.com>
Download (untitled) / with headers
text/plain 933b
Hello, I am using Class::Method::Modifiers v2.10 and I ran into an issue where method modifiers are not getting applied when a subclass overrides a parent method with modifiers. I've attached a test that shows an example of this failure. Feel free to tell me if this is just a bad design pattern I'm using, but to add context to how this came about, I should note that I am inheriting from a parent that implements a Moo role, and the role is what has the modifiers. An easy solution for my code was to reapply the role in the child, but I'm wondering if there is an obvious fix that would make that unnecessary. I'm having trouble visualizing how Class::Method::Modifiers would know methods are getting subclassed, so this may be something better done at the Moo/Moose level during inheritance. Worst case scenario, it may be nice just to add a warning about this in the docs. Thanks for you work on this module, Mark Flickinger
Download (untitled) / with headers
text/html 1019b

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 605b
On Mon Aug 25 00:15:58 2014, maflick88@gmail.com wrote: Show quoted text
> Hello, > > I am using Class::Method::Modifiers v2.10 and I ran into an issue where > method modifiers are not getting applied when a subclass overrides a parent > method with modifiers.
Sorry for not answering this earlier. I am curious what led you to the mental model of "modifications" declared with Class::Method::Modifiers are intended to become part of the method resolution mechanism, as opposed to being simple wrappers at a package level. Elaborating on that would make it easier to write the relevant piece of documentation. Cheers!
Download (untitled) / with headers
text/plain 130b
I'm not quite understanding the situation here -- is there a code issue, or something that needs to be clarified in documentation?
Download (untitled) / with headers
text/plain 405b
On 2015-09-21 11:49:15, ETHER wrote: Show quoted text
> I'm not quite understanding the situation here -- is there a code > issue, or something that needs to be clarified in documentation?
Ah, never mind, I stared more at the provided testcase, and I see that the subclass methods are not ever calling the parent (via next::method, SUPER, etc). I don't see any bugs here except some documentation that could be clarified.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.