Skip Menu |

This queue is for tickets about the Catalyst-Controller-RequestToken CPAN distribution.

Report information
The Basics
Id: 104955
Status: open
Priority: 0/
Queue: Catalyst-Controller-RequestToken

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

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



Subject: fails live-test.t with "Cant locate in @INC" with non-existent module
 perl -d:Confess -Ilib -It/lib -MTestApp

Can't locate Catalyst/Action/Catalyst/Controller/RequestToken/Action/CreateToken.pm in @INC (you may need to install the Catalyst::Action::Catalyst::Controller::RequestToken::Action::CreateToken module) (@INC contains: lib t/lib /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/x86_64-linux /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9 /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/5.21.9/x86_64-linux /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/5.21.9 .) at /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/Class/Load.pm line 203.
        Class::Load::_croak("Can't locate Catalyst/Action/Catalyst/Controller/RequestToken"...) called at /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/Class/Load.pm line 44
        Class::Load::load_class("Catalyst::Action::Catalyst::Controller::RequestToken::Action:"...) called at /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/Catalyst/Controller.pm line 323
        Catalyst::Controller::action_class(TestApp::Controller::Simple=HASH(0x49ae1d8), "name", "form", "code", CODE(0x46ee5b8), "attributes", HASH(0x49fea08), "class", "TestApp::Controller::Simple", ...) called at /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/Catalyst/Controller.pm line 331
        Catalyst::Controller::create_action(TestApp::Controller::Simple=HASH(0x49ae1d8), "name", "form", "code", CODE(0x46ee5b8), "reverse", "simple/form", "namespace", "simple", ...) called at /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/Catalyst/Controller.pm line 288
        Catalyst::Controller::register_action_methods(TestApp::Controller::Simple=HASH(0x49ae1d8), "TestApp", Moose::Meta::Class::__ANON__::SERIAL::2=HASH(0x49fba20), Moose::Meta::Class::__ANON__::SERIAL::2=HASH(0x49fb7e0), Moose::Meta::Class::__ANON__::SERIAL::2=HASH(0x49fb6c0), Moose::Meta::Class::__ANON__::SERIAL::2=HASH(0x49fb480), Moose::Meta::Class::__ANON__::SERIAL::2=HASH(0x49d3998), Moose::Meta::Class::__ANON__::SERIAL::2=HASH(0x4986ea0), Moose::Meta::Class::__ANON__::SERIAL::2=HASH(0x49fe060), ...) called at /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/Catalyst/Controller.pm line 257
        Catalyst::Controller::register_actions(TestApp::Controller::Simple=HASH(0x49ae1d8), "TestApp") called at /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/Catalyst/Dispatcher.pm line 618
        Catalyst::Dispatcher::setup_actions(Catalyst::Dispatcher=HASH(0x4637b28), "TestApp") called at /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/Catalyst.pm line 2809
        Catalyst::setup_actions("TestApp") called at /home/kent/perl5/perlbrew/perls/5.21.8-c/lib/site_perl/5.21.9/Catalyst.pm line 1401
        Catalyst::setup("TestApp") called at t/lib/TestApp.pm line 8
        require TestApp.pm called at - line 0
        main::BEGIN() called at t/lib/TestApp.pm line 0
        eval {...} called at t/lib/TestApp.pm line 0
Compilation failed in require.
 at - line 0.
        main::BEGIN() called at - line 0
        eval {...} called at - line 0
BEGIN failed--compilation aborted.
 at - line 0.
Subject: [rt.cpan.org #104955]
Date: Fri, 5 Aug 2016 15:15:40 +0100
To: bug-Catalyst-Controller-RequestToken [...] rt.cpan.org
From: Dawid Joubert <dawidpjoubert [...] gmail.com>
Bug fix for this ticket is simple, hint is in the error code: Can't locate Catalyst/Action/Catalyst/Controller/RequestToken/Action/CreateToken.pm At some point since after the author made RequestToken module Catalyst framework changed the way it loads Actions. So it seems you no longer need to include the route part of the action class and can omit the 'Catalyst::Action' portion of your action This has the side effect that older modules like RequestToken need to move their actions from Catalyst::Controller::RequestToken::Action::* to Catalyst::Action::RequestToken::*. Module names must be chagned appropriately and also Catalyst/Controller/RequestToken.pm needs to be modified to remove the 'Catalyst::Controller::' part from in front of the action methods. My make folder with source changes are here: https://www.dropbox.com/s/x56an7pur0xpja4/Catalyst_Controller_RequestToken-fix.tar?dl=0 Best Regards, Dawid