Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 84802
Status: resolved
Priority: 0/
Queue: Moo

People
Owner: Nobody in particular
Requestors: boris.ujinsky [...] gmail.com
Cc:
AdminCc:

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



Subject: Can't locate object method "apply_roles_to_package" via package "Moo::Role"
Date: Tue, 23 Apr 2013 11:58:56 +0400
To: bug-Moo [...] rt.cpan.org
From: Ужинский Борис <boris.ujinsky [...] gmail.com>
Module = Moo (MSTROUT/Moo-1.001000.tar.gz) This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi Linux calc 2.6.32-5-amd64 #1 SMP (Debian 6.0.7) Error: Can't locate object method "apply_roles_to_package" via package "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line 208. BEGIN failed--compilation aborted at 3.pl line 3. Code: $cat 3.pl use JSON::RPC::Client; use Moo; use Object::AUTHORITY; Error: Can't locate object method "apply_roles_to_package" via package "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line 208. BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/Finance/Bitcoin/API.pm line 13. Compilation failed in require at 1.pl line 1. BEGIN failed--compilation aborted at 1.pl line 1. Code: $cat 1.pl use Finance::Bitcoin::API; my $uri = 'http://USER:PASS@localhost:8332/'; my $bitcoin_hndl = Finance::Bitcoin::API->new( endpoint => $uri ); my $balance = $bitcoin_hndl->call('getbalance'); die( $bitcoin_hndl->error ) if $bitcoin_hndl->error; print "$balance\n";
On Tue Apr 23 04:03:53 2013, boris.ujinsky@gmail.com wrote: Show quoted text
> Module = Moo (MSTROUT/Moo-1.001000.tar.gz) > This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi > Linux calc 2.6.32-5-amd64 #1 SMP (Debian 6.0.7) > > Error: > Can't locate object method "apply_roles_to_package" via package "Moo::Role" > at /usr/local/share/perl/5.10.1/Moo/Role.pm line 208. > BEGIN failed--compilation aborted at 3.pl line 3. > > Code: > $cat 3.pl > use JSON::RPC::Client; > use Moo; > use Object::AUTHORITY; > > > Error: > Can't locate object method "apply_roles_to_package" via package "Moo::Role" > at /usr/local/share/perl/5.10.1/Moo/Role.pm line 208. > BEGIN failed--compilation aborted > at /usr/local/share/perl/5.10.1/Finance/Bitcoin/API.pm line 13. > Compilation failed in require at 1.pl line 1. > BEGIN failed--compilation aborted at 1.pl line 1. > > Code: > $cat 1.pl > use Finance::Bitcoin::API; > my $uri = 'http://USER:PASS@localhost:8332/'; > my $bitcoin_hndl = Finance::Bitcoin::API->new( endpoint => $uri ); > my $balance = $bitcoin_hndl->call('getbalance'); > die( $bitcoin_hndl->error ) if $bitcoin_hndl->error; > print "$balance\n"; >
I can't reproduce the error with either of the code samples you provided. What version of Role::Commons and Object::AUTHORITY do you have?
Subject: [rt.cpan.org #84802] Can't locate object method "apply_roles_to_package" via package "Moo::Role"
Date: Wed, 24 Apr 2013 10:54:49 +0400
To: bug-Moo [...] rt.cpan.org
From: Ужинский Борис <boris.ujinsky [...] gmail.com>
On Tuesday 23 April 2013 21:09:43 Graham Knop via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84802 > > > On Tue Apr 23 04:03:53 2013, boris.ujinsky@gmail.com wrote:
> > Module = Moo (MSTROUT/Moo-1.001000.tar.gz) > > This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi > > Linux calc 2.6.32-5-amd64 #1 SMP (Debian 6.0.7) > > > > Error: > > Can't locate object method "apply_roles_to_package" via package > > "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line 208. > > BEGIN failed--compilation aborted at 3.pl line 3. > > > > Code: > > $cat 3.pl > > use JSON::RPC::Client; > > use Moo; > > use Object::AUTHORITY; > > > > > > Error: > > Can't locate object method "apply_roles_to_package" via package > > "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line 208. > > BEGIN failed--compilation aborted > > at /usr/local/share/perl/5.10.1/Finance/Bitcoin/API.pm line 13. > > Compilation failed in require at 1.pl line 1. > > BEGIN failed--compilation aborted at 1.pl line 1. > > > > Code: > > $cat 1.pl > > use Finance::Bitcoin::API; > > my $uri = 'http://USER:PASS@localhost:8332/'; > > my $bitcoin_hndl = Finance::Bitcoin::API->new( endpoint => $uri ); > > my $balance = $bitcoin_hndl->call('getbalance'); > > die( $bitcoin_hndl->error ) if $bitcoin_hndl->error; > > print "$balance\n";
> > I can't reproduce the error with either of the code samples you provided. > What version of Role::Commons and Object::AUTHORITY do you have?
Module id = Role::Commons CPAN_USERID TOBYINK (Toby Inkster <tobyink@cpan.org>) CPAN_VERSION 0.101 CPAN_FILE T/TO/TOBYINK/Role-Commons-0.101.tar.gz UPLOAD_DATE 2012-10-31 MANPAGE Role::Commons - roles that can be commonly used INST_FILE /usr/local/share/perl/5.10.1/Role/Commons.pm INST_VERSION 0.101 Module id = Object::AUTHORITY CPAN_USERID TOBYINK (Toby Inkster <tobyink@cpan.org>) CPAN_VERSION 0.101 CPAN_FILE T/TO/TOBYINK/Role-Commons-0.101.tar.gz UPLOAD_DATE 2012-10-31 INST_FILE /usr/local/share/perl/5.10.1/Object/AUTHORITY.pm INST_VERSION 0.101
On Wed Apr 24 02:59:48 2013, boris.ujinsky@gmail.com wrote: Show quoted text
> On Tuesday 23 April 2013 21:09:43 Graham Knop via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=84802 > > > > > On Tue Apr 23 04:03:53 2013, boris.ujinsky@gmail.com wrote:
> > > Module = Moo (MSTROUT/Moo-1.001000.tar.gz) > > > This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi > > > Linux calc 2.6.32-5-amd64 #1 SMP (Debian 6.0.7) > > > > > > Error: > > > Can't locate object method "apply_roles_to_package" via package > > > "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line 208. > > > BEGIN failed--compilation aborted at 3.pl line 3. > > > > > > Code: > > > $cat 3.pl > > > use JSON::RPC::Client; > > > use Moo; > > > use Object::AUTHORITY; > > > > > > > > > Error: > > > Can't locate object method "apply_roles_to_package" via package > > > "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line 208. > > > BEGIN failed--compilation aborted > > > at /usr/local/share/perl/5.10.1/Finance/Bitcoin/API.pm line 13. > > > Compilation failed in require at 1.pl line 1. > > > BEGIN failed--compilation aborted at 1.pl line 1. > > > > > > Code: > > > $cat 1.pl > > > use Finance::Bitcoin::API; > > > my $uri = 'http://USER:PASS@localhost:8332/'; > > > my $bitcoin_hndl = Finance::Bitcoin::API->new( endpoint => $uri ); > > > my $balance = $bitcoin_hndl->call('getbalance'); > > > die( $bitcoin_hndl->error ) if $bitcoin_hndl->error; > > > print "$balance\n";
> > > > I can't reproduce the error with either of the code samples you provided. > > What version of Role::Commons and Object::AUTHORITY do you have?
> > Module id = Role::Commons > CPAN_USERID TOBYINK (Toby Inkster <tobyink@cpan.org>) > CPAN_VERSION 0.101 > CPAN_FILE T/TO/TOBYINK/Role-Commons-0.101.tar.gz > UPLOAD_DATE 2012-10-31 > MANPAGE Role::Commons - roles that can be commonly used > INST_FILE /usr/local/share/perl/5.10.1/Role/Commons.pm > INST_VERSION 0.101 > > Module id = Object::AUTHORITY > CPAN_USERID TOBYINK (Toby Inkster <tobyink@cpan.org>) > CPAN_VERSION 0.101 > CPAN_FILE T/TO/TOBYINK/Role-Commons-0.101.tar.gz > UPLOAD_DATE 2012-10-31 > INST_FILE /usr/local/share/perl/5.10.1/Object/AUTHORITY.pm > INST_VERSION 0.101
Can you try running one of your failing scripts again with Carp::Always? Should be as simple as: perl -MCarp::Always 3.pl
Subject: [rt.cpan.org #84802] Can't locate object method "apply_roles_to_package" via package "Moo::Role"
Date: Thu, 25 Apr 2013 10:35:48 +0400
To: bug-Moo [...] rt.cpan.org
From: Ужинский Борис <boris.ujinsky [...] gmail.com>
On Thursday 25 April 2013 01:07:16 Graham Knop via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84802 > > > On Wed Apr 24 02:59:48 2013, boris.ujinsky@gmail.com wrote:
> > On Tuesday 23 April 2013 21:09:43 Graham Knop via RT wrote:
> > > <URL: https://rt.cpan.org/Ticket/Display.html?id=84802 > > > > > > > On Tue Apr 23 04:03:53 2013, boris.ujinsky@gmail.com wrote:
> > > > Module = Moo (MSTROUT/Moo-1.001000.tar.gz) > > > > This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi > > > > Linux calc 2.6.32-5-amd64 #1 SMP (Debian 6.0.7) > > > > > > > > Error: > > > > Can't locate object method "apply_roles_to_package" via package > > > > "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line 208. > > > > BEGIN failed--compilation aborted at 3.pl line 3. > > > > > > > > Code: > > > > $cat 3.pl > > > > use JSON::RPC::Client; > > > > use Moo; > > > > use Object::AUTHORITY; > > > > > > > > > > > > Error: > > > > Can't locate object method "apply_roles_to_package" via package > > > > "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line 208. > > > > BEGIN failed--compilation aborted > > > > at /usr/local/share/perl/5.10.1/Finance/Bitcoin/API.pm line 13. > > > > Compilation failed in require at 1.pl line 1. > > > > BEGIN failed--compilation aborted at 1.pl line 1. > > > > > > > > Code: > > > > $cat 1.pl > > > > use Finance::Bitcoin::API; > > > > my $uri = 'http://USER:PASS@localhost:8332/'; > > > > my $bitcoin_hndl = Finance::Bitcoin::API->new( endpoint => $uri ); > > > > my $balance = $bitcoin_hndl->call('getbalance'); > > > > die( $bitcoin_hndl->error ) if $bitcoin_hndl->error; > > > > print "$balance\n";
> > > > > > I can't reproduce the error with either of the code samples you > > > provided. What version of Role::Commons and Object::AUTHORITY do you > > > have?
> > > > Module id = Role::Commons > > CPAN_USERID TOBYINK (Toby Inkster <tobyink@cpan.org>) > > CPAN_VERSION 0.101 > > CPAN_FILE T/TO/TOBYINK/Role-Commons-0.101.tar.gz > > UPLOAD_DATE 2012-10-31 > > MANPAGE Role::Commons - roles that can be commonly used > > INST_FILE /usr/local/share/perl/5.10.1/Role/Commons.pm > > INST_VERSION 0.101 > > > > Module id = Object::AUTHORITY > > CPAN_USERID TOBYINK (Toby Inkster <tobyink@cpan.org>) > > CPAN_VERSION 0.101 > > CPAN_FILE T/TO/TOBYINK/Role-Commons-0.101.tar.gz > > UPLOAD_DATE 2012-10-31 > > INST_FILE /usr/local/share/perl/5.10.1/Object/AUTHORITY.pm > > INST_VERSION 0.101
> > Can you try running one of your failing scripts again with Carp::Always? > Should be as simple as: perl -MCarp::Always 3.pl
$ perl -MCarp::Always 3.pl Can't locate object method "apply_roles_to_package" via package "Moo::Role" at 3.pl line 3
Subject: [rt.cpan.org #84802] Can't locate object method "apply_roles_to_package" via package "Moo::Role"
Date: Thu, 25 Apr 2013 10:38:21 +0400
To: bug-Moo [...] rt.cpan.org
From: Ужинский Борис <boris.ujinsky [...] gmail.com>
Module id = Carp::Always CPAN_USERID FERREIRA (Adriano Ferreira <ferreira@cpan.org>) CPAN_VERSION 0.12 CPAN_FILE F/FE/FERREIRA/Carp-Always-0.12.tar.gz MANPAGE Carp::Always - Warns and dies noisily with stack backtraces INST_FILE /usr/share/perl5/Carp/Always.pm INST_VERSION 0.09
On Thu Apr 25 02:36:24 2013, boris.ujinsky@gmail.com wrote: Show quoted text
> On Thursday 25 April 2013 01:07:16 Graham Knop via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=84802 > > > > > On Wed Apr 24 02:59:48 2013, boris.ujinsky@gmail.com wrote:
> > > On Tuesday 23 April 2013 21:09:43 Graham Knop via RT wrote:
> > > > <URL: https://rt.cpan.org/Ticket/Display.html?id=84802 > > > > > > > > > On Tue Apr 23 04:03:53 2013, boris.ujinsky@gmail.com wrote:
> > > > > Module = Moo (MSTROUT/Moo-1.001000.tar.gz) > > > > > This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-
> multi
> > > > > Linux calc 2.6.32-5-amd64 #1 SMP (Debian 6.0.7) > > > > > > > > > > Error: > > > > > Can't locate object method "apply_roles_to_package" via
> package
> > > > > "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line
> 208.
> > > > > BEGIN failed--compilation aborted at 3.pl line 3. > > > > > > > > > > Code: > > > > > $cat 3.pl > > > > > use JSON::RPC::Client; > > > > > use Moo; > > > > > use Object::AUTHORITY; > > > > > > > > > > > > > > > Error: > > > > > Can't locate object method "apply_roles_to_package" via
> package
> > > > > "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line
> 208.
> > > > > BEGIN failed--compilation aborted > > > > > at /usr/local/share/perl/5.10.1/Finance/Bitcoin/API.pm line
> 13.
> > > > > Compilation failed in require at 1.pl line 1. > > > > > BEGIN failed--compilation aborted at 1.pl line 1. > > > > > > > > > > Code: > > > > > $cat 1.pl > > > > > use Finance::Bitcoin::API; > > > > > my $uri = 'http://USER:PASS@localhost:8332/'; > > > > > my $bitcoin_hndl = Finance::Bitcoin::API->new( endpoint =>
> $uri );
> > > > > my $balance = $bitcoin_hndl->call('getbalance'); > > > > > die( $bitcoin_hndl->error ) if $bitcoin_hndl->error; > > > > > print "$balance\n";
> > > > > > > > I can't reproduce the error with either of the code samples you > > > > provided. What version of Role::Commons and Object::AUTHORITY do
> you
> > > > have?
> > > > > > Module id = Role::Commons > > > CPAN_USERID TOBYINK (Toby Inkster <tobyink@cpan.org>) > > > CPAN_VERSION 0.101 > > > CPAN_FILE T/TO/TOBYINK/Role-Commons-0.101.tar.gz > > > UPLOAD_DATE 2012-10-31 > > > MANPAGE Role::Commons - roles that can be commonly used > > > INST_FILE /usr/local/share/perl/5.10.1/Role/Commons.pm > > > INST_VERSION 0.101 > > > > > > Module id = Object::AUTHORITY > > > CPAN_USERID TOBYINK (Toby Inkster <tobyink@cpan.org>) > > > CPAN_VERSION 0.101 > > > CPAN_FILE T/TO/TOBYINK/Role-Commons-0.101.tar.gz > > > UPLOAD_DATE 2012-10-31 > > > INST_FILE /usr/local/share/perl/5.10.1/Object/AUTHORITY.pm > > > INST_VERSION 0.101
> > > > Can you try running one of your failing scripts again with
> Carp::Always?
> > Should be as simple as: perl -MCarp::Always 3.pl
> > $ perl -MCarp::Always 3.pl > Can't locate object method "apply_roles_to_package" via package > "Moo::Role" at > 3.pl line 3
You actually get less information when using Carp::Always? What version of Role::Tiny do you have?
Subject: Re: [rt.cpan.org #84802] Can't locate object method "apply_roles_to_package" via package "Moo::Role"
Date: Tue, 30 Apr 2013 14:45:17 +0400
To: bug-Moo [...] rt.cpan.org
From: Ужинский Борис <boris.ujinsky [...] gmail.com>
On Tuesday 30 April 2013 13:38:36 Graham Knop via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84802 > > > On Thu Apr 25 02:36:24 2013, boris.ujinsky@gmail.com wrote:
> > On Thursday 25 April 2013 01:07:16 Graham Knop via RT wrote:
> > > <URL: https://rt.cpan.org/Ticket/Display.html?id=84802 > > > > > > > On Wed Apr 24 02:59:48 2013, boris.ujinsky@gmail.com wrote:
> > > > On Tuesday 23 April 2013 21:09:43 Graham Knop via RT wrote:
> > > > > <URL: https://rt.cpan.org/Ticket/Display.html?id=84802 > > > > > > > > > > > On Tue Apr 23 04:03:53 2013, boris.ujinsky@gmail.com wrote:
> > > > > > Module = Moo (MSTROUT/Moo-1.001000.tar.gz) > > > > > > This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-
> > > > multi > >
> > > > > > Linux calc 2.6.32-5-amd64 #1 SMP (Debian 6.0.7) > > > > > > > > > > > > Error: > > > > > > Can't locate object method "apply_roles_to_package" via
> > > > package > >
> > > > > > "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line
> > > > 208. > >
> > > > > > BEGIN failed--compilation aborted at 3.pl line 3. > > > > > > > > > > > > Code: > > > > > > $cat 3.pl > > > > > > use JSON::RPC::Client; > > > > > > use Moo; > > > > > > use Object::AUTHORITY; > > > > > > > > > > > > > > > > > > Error: > > > > > > Can't locate object method "apply_roles_to_package" via
> > > > package > >
> > > > > > "Moo::Role" at /usr/local/share/perl/5.10.1/Moo/Role.pm line
> > > > 208. > >
> > > > > > BEGIN failed--compilation aborted > > > > > > at /usr/local/share/perl/5.10.1/Finance/Bitcoin/API.pm line
> > > > 13. > >
> > > > > > Compilation failed in require at 1.pl line 1. > > > > > > BEGIN failed--compilation aborted at 1.pl line 1. > > > > > > > > > > > > Code: > > > > > > $cat 1.pl > > > > > > use Finance::Bitcoin::API; > > > > > > my $uri = 'http://USER:PASS@localhost:8332/'; > > > > > > my $bitcoin_hndl = Finance::Bitcoin::API->new( endpoint =>
> > > > $uri ); > >
> > > > > > my $balance = $bitcoin_hndl->call('getbalance'); > > > > > > die( $bitcoin_hndl->error ) if $bitcoin_hndl->error; > > > > > > print "$balance\n";
> > > > > > > > > > I can't reproduce the error with either of the code samples you > > > > > provided. What version of Role::Commons and Object::AUTHORITY do
> > > > you > >
> > > > > have?
> > > > > > > > Module id = Role::Commons > > > > CPAN_USERID TOBYINK (Toby Inkster <tobyink@cpan.org>) > > > > CPAN_VERSION 0.101 > > > > CPAN_FILE T/TO/TOBYINK/Role-Commons-0.101.tar.gz > > > > UPLOAD_DATE 2012-10-31 > > > > MANPAGE Role::Commons - roles that can be commonly used > > > > INST_FILE /usr/local/share/perl/5.10.1/Role/Commons.pm > > > > INST_VERSION 0.101 > > > > > > > > Module id = Object::AUTHORITY > > > > CPAN_USERID TOBYINK (Toby Inkster <tobyink@cpan.org>) > > > > CPAN_VERSION 0.101 > > > > CPAN_FILE T/TO/TOBYINK/Role-Commons-0.101.tar.gz > > > > UPLOAD_DATE 2012-10-31 > > > > INST_FILE /usr/local/share/perl/5.10.1/Object/AUTHORITY.pm > > > > INST_VERSION 0.101
> > > > > > Can you try running one of your failing scripts again with
> > > > Carp::Always? > >
> > > Should be as simple as: perl -MCarp::Always 3.pl
> > > > $ perl -MCarp::Always 3.pl > > Can't locate object method "apply_roles_to_package" via package > > "Moo::Role" at > > 3.pl line 3
> > You actually get less information when using Carp::Always?
yes. Show quoted text
> What version of Role::Tiny do you have?
Module id = Role::Tiny CPAN_USERID MSTROUT (Matt S Trout <perl-stuff@trout.me.uk>) CPAN_VERSION 1.002005 CPAN_FILE M/MS/MSTROUT/Role-Tiny-1.002005.tar.gz INST_FILE (not installed)
Show quoted text
> INST_FILE (not installed)
I don't know how you managed to install Moo without having Role::Tiny, but you need it!
This is caused partly by Role::Tiny not being installed on your system. I'm not sure how that happened, since it is properly listed as a prerequisite. That part isn't a bug. The second issue is that the module being missing wasn't triggering a proper error. I've committed a fix for this, which will be in the next release.
Fixed in 1.003000