Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 100702
Status: open
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 2.1100-TRIAL
Fixed in: (no value)



Subject: Moose newer than 2.1005 cannot find a class in not explicitly loaded module
Archive::RPM stopped to work with Moose newer than 2.1005. See CPAN RT#100701 for more details. In short, delegating to a class whose name differs from a module name does not work anymore because the %INC does contain an entry. This is because Moose changes a way how too look for a class in this commit: commit c16411bc122732a1fe7f96f801a5cf127b146406 Author: Jesse Luehrs <doy@tozt.net> Date: Wed Sep 4 14:39:59 2013 -0400 stop using Class::Load The heuristics involved in is_class_loaded and such have caused all kinds of issues over the years. Instead, we should use Module::Runtime, which uses %INC as the only check to see if a package has been loaded. This should hopefully not cause too many problems now that we make sure the appropriate %INC entry is set whenever Moose creates a class. Class::Load should stay as a dep for now, because we haven't actually deprecated Class::MOP::load_class and such yet, but we should get on that too. Is there any plan to fix it?
CC: ;
Subject: Re: [rt.cpan.org #100702] Moose newer than 2.1005 cannot find a class in not explicitly loaded module
Date: Thu, 4 Dec 2014 11:46:53 -0500
To: Petr Pisar via RT <bug-Moose [...] rt.cpan.org>
From: Jesse Luehrs <doy [...] tozt.net>
This was an intentional change. You can fix this fairly easily by just adding your classes to %INC manually, if they don't correspond to the name of the module they are defined in. -doy On Thu, Dec 04, 2014 at 08:47:15AM -0500, Petr Pisar via RT wrote: Show quoted text
> Thu Dec 04 08:47:12 2014: Request 100702 was acted upon. > Transaction: Ticket created by ppisar > Queue: Moose > Subject: Moose newer than 2.1005 cannot find a class in not explicitly > loaded module > Broken in: 2.1402 > Severity: (no value) > Owner: Nobody > Requestors: ppisar@redhat.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=100702 > > > > Archive::RPM stopped to work with Moose newer than 2.1005. See CPAN RT#100701 for more details. In short, delegating to a class whose name differs from a module name does not work anymore because the %INC does contain an entry. > > This is because Moose changes a way how too look for a class in this commit: > > commit c16411bc122732a1fe7f96f801a5cf127b146406 > Author: Jesse Luehrs <doy@tozt.net> > Date: Wed Sep 4 14:39:59 2013 -0400 > > stop using Class::Load > > The heuristics involved in is_class_loaded and such have caused all > kinds of issues over the years. Instead, we should use Module::Runtime, > which uses %INC as the only check to see if a package has been loaded. > This should hopefully not cause too many problems now that we make sure > the appropriate %INC entry is set whenever Moose creates a class. > > Class::Load should stay as a dep for now, because we haven't actually > deprecated Class::MOP::load_class and such yet, but we should get on > that too. > > Is there any plan to fix it? >
Subject: Re: [rt.cpan.org #100702] Moose newer than 2.1005 cannot find a class in not explicitly loaded module
Date: Thu, 4 Dec 2014 17:57:17 +0100
To: Jesse Luehrs via RT <bug-Moose [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
On Thu, Dec 04, 2014 at 11:47:03AM -0500, Jesse Luehrs via RT wrote: Show quoted text
> This was an intentional change.
I understand. Show quoted text
> You can fix this fairly easily by just adding your classes to %INC manually, > if they don't correspond to the name of the module they are defined in. >
It would be great if this could be noticed in the Moose's documentation. -- Petr
Download (untitled)
application/pgp-signature 213b

Message body not shown because it is not plain text.