Skip Menu |

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

Report information
The Basics
Id: 97948
Status: resolved
Priority: 0/
Queue: Catalyst-Runtime

People
Owner: Nobody in particular
Requestors: nonsolosoft [...] diff.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 5.90070
  • 5.90071
Fixed in: (no value)



Subject: Catalyst::Test->ctx_request $c->stash is undefined
I was writting a new test using it. use Catalyst::Test 'MyApp'; my ($res, $c) = ctx_request('/'); Can't call method "stash" on unblessed reference
On Mon Aug 11 19:32:14 2014, nonsolosoft@diff.org wrote: Show quoted text
> I was writting a new test using it. > > use Catalyst::Test 'MyApp'; > > my ($res, $c) = ctx_request('/'); > > > Can't call method "stash" on unblessed reference
Hi, This might have been fixed a while ago. I find the following test case works as expected: use warnings; use strict; # For reported: https://rt.cpan.org/Ticket/Display.html?id=97948 { package MyApp::Controller::Root; $INC{'MyApp/Controller/Root.pm'} = __FILE__; use base 'Catalyst::Controller'; sub example :Local Args(0) { pop->stash->{testing1} = 'testing2'; } package MyApp; use Catalyst; MyApp->setup; } use Test::More; use Catalyst::Test 'MyApp'; my ($res, $c) = ctx_request('/root/example'); is $c->stash->{testing1}, 'testing2', 'got expected stash value'; done_testing; I added this to the test suite to prevent regressions. I will close this bug report, but if you find the behavior is still broken please reopen it and please include the full test case and related controllers and other information so that I can figure it out. Sorry for the slow notice. I tend to use github issues and don't always follow RT.