Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-2805-1417700832-1934.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1026
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: ;
MIME-Version: 1.0
X-Spam-Status: No, score=-5.8 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, FROM_OUR_RT=-4, T_DKIM_INVALID=0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
In-Reply-To: <rt-4.0.18-2805-1417700833-1562.100702-4-0 [...] rt.cpan.org>
Content-Disposition: inline
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-100702 [...] rt.cpan.org> <rt-4.0.18-2805-1417700833-1562.100702-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20141204164653.GJ2437 [...] lance.net.hackerschool.com>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.8
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=softfail (invalid, public key: does not support hash algorithm 'sha256') header.i= [...] tozt.net
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id BA0DF24070C for <cpan-bug+Moose [...] hipster.bestpractical.com>; Thu, 4 Dec 2014 11:47:01 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id furVOpccYK-l for <cpan-bug+Moose [...] hipster.bestpractical.com>; Thu, 4 Dec 2014 11:46:59 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 83D88240583 for <bug-Moose [...] rt.cpan.org>; Thu, 4 Dec 2014 11:46:59 -0500 (EST)
Received: (qmail 25626 invoked by alias); 4 Dec 2014 16:46:59 -0000
Received: from tozt.net (HELO mail.tozt.net) (162.216.19.228) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 04 Dec 2014 08:46:57 -0800
Received: from localhost (177.sub-70-192-85.myvzw.com [70.192.85.177]) by mail.tozt.net (Postfix) with ESMTPSA id 40C5CA3BC for <bug-Moose [...] rt.cpan.org>; Thu, 4 Dec 2014 11:46:52 -0500 (EST)
Delivered-To: cpan-bug+Moose [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #100702] Moose newer than 2.1005 cannot find a class in not explicitly loaded module
User-Agent: Mutt/1.5.23 (2014-03-12)
Return-Path: <doy [...] tozt.net>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tozt.net; s=mail; t=1417711612; bh=L4tuToZyNnv7cKRb+uGSmONAmJ6dKH++W7oB+XRdRzU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=ItifFTMKnqrAJHg9u2+wF+efd/VFtM6ZYVLFKnInf/nucOjrpG9u2SwitCOrZ4HTQ ooIlVK7o0QLDdTdUJCJb9mIW+PM+fihgEp6Yge94Zs8z5Fat216AtmUTQxAYef4Jgm 4jCsm4m1m82EVqDIv1DqHf0ep/OHpx4YCApoloj8=
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+Moose [...] hipster.bestpractical.com
X-RT-Mail-Extension: moose
Date: Thu, 4 Dec 2014 11:46:53 -0500
X-Spam-Level:
To: Petr Pisar via RT <bug-Moose [...] rt.cpan.org>
From: Jesse Luehrs <doy [...] tozt.net>
RT-Message-ID: <rt-4.0.18-6285-1417711622-1535.100702-0-0 [...] rt.cpan.org>
Content-Length: 1744
Download (untitled) / with headers
text/plain 1.7k
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? >
X-Scanned-BY: MIMEDefang 2.68 on 10.5.11.26
MIME-Version: 1.0
X-Spam-Status: No, score=-10.526 tagged_above=-99.9 required=10 tests=[AWL=0.385, BAYES_00=-1.9, FROM_OUR_RT=-4, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
X-Authentication-Warning: dhcp-0-146.brq.redhat.com: petr set sender to ppisar [...] redhat.com using -f
In-Reply-To: <rt-4.0.18-6285-1417711623-206.100702-6-0 [...] rt.cpan.org>
Content-Disposition: inline
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-100702 [...] rt.cpan.org> <rt-4.0.18-2805-1417700833-1562.100702-4-0 [...] rt.cpan.org> <20141204164653.GJ2437 [...] lance.net.hackerschool.com> <rt-4.0.18-6285-1417711623-206.100702-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20141204165717.GA5169 [...] dhcp-0-146.brq.redhat.com>
Content-Type: multipart/signed; boundary="MGYHOYXEY6WxJCY8"; micalg="pgp-sha256"; protocol="application/pgp-signature"
X-Spam-Score: -10.526
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 4554C24070C for <cpan-bug+Moose [...] hipster.bestpractical.com>; Thu, 4 Dec 2014 11:57:28 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 91od+pM+V9nV for <cpan-bug+Moose [...] hipster.bestpractical.com>; Thu, 4 Dec 2014 11:57:26 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id AD92C240583 for <bug-Moose [...] rt.cpan.org>; Thu, 4 Dec 2014 11:57:26 -0500 (EST)
Received: (qmail 26404 invoked by alias); 4 Dec 2014 16:57:26 -0000
Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 04 Dec 2014 08:57:24 -0800
Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sB4GvKJQ021087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for <bug-Moose [...] rt.cpan.org>; Thu, 4 Dec 2014 11:57:20 -0500
Received: from dhcp-0-146.brq.redhat.com (unused-4-140.brq.redhat.com [10.34.4.140]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sB4GvIOE025944 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for <bug-Moose [...] rt.cpan.org>; Thu, 4 Dec 2014 11:57:20 -0500
Received: from dhcp-0-146.brq.redhat.com (localhost.localdomain [127.0.0.1]) by dhcp-0-146.brq.redhat.com (8.14.8/8.14.5) with ESMTP id sB4GvIDk010397 for <bug-Moose [...] rt.cpan.org>; Thu, 4 Dec 2014 17:57:18 +0100
Received: (from petr [...] localhost) by dhcp-0-146.brq.redhat.com (8.14.8/8.14.8/Submit) id sB4GvIB4010396 for bug-Moose [...] rt.cpan.org; Thu, 4 Dec 2014 17:57:18 +0100
Delivered-To: cpan-bug+Moose [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #100702] Moose newer than 2.1005 cannot find a class in not explicitly loaded module
User-Agent: Mutt/1.5.23 (2014-03-12)
Return-Path: <ppisar [...] redhat.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+Moose [...] hipster.bestpractical.com
X-RT-Mail-Extension: moose
Date: Thu, 4 Dec 2014 17:57:17 +0100
X-Spam-Level:
To: Jesse Luehrs via RT <bug-Moose [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
RT-Message-ID: <rt-4.0.18-6285-1417712248-1207.100702-0-0 [...] rt.cpan.org>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Disposition: inline
X-RT-Original-Encoding: utf-8
Content-Length: 356
Download (untitled) / with headers
text/plain 356b
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
Content-Type: application/pgp-signature
Content-Length: 213
Download (untitled)
application/pgp-signature 213b

Message body not shown because it is not plain text.



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.