yahermann
yahermann

Reputation: 1569

Perl Dancer 'forward' appears to throw warning when deployed in uWSGI

Deploying a Perl Dancer app. It appears that every time a Dancer 'forward'

http://search.cpan.org/~yanick/Dancer-1.3140/lib/Dancer.pm#forward

within a uWSGI-deployed app, uWSGI logs this warning even though the forward works just fine:

Trace begun at (eval 839) line 1 main::ANON('Dancer::Continuation::Route::Forwarded=HASH(0x65e4d60)') called at /usr/share/perl5/Dancer/Continuation.pm line 12 Dancer::Continuation::throw('Dancer::Continuation::Route::Forwarded=HASH(0x65e4d60)') called at /usr/share/perl5/Dancer.pm line 151 Dancer::forward('/error/msg/Unknown+user') called at /home/i2/www/lib/user/profile.pm line 103 user::profile::ANON at /usr/share/perl5/Dancer/Route.pm line 262 Dancer::Route::execute('Dancer::Route=HASH(0x5b40ca0)') called at /usr/share/perl5/Dancer/Route.pm line 177 Dancer::Route::try {...} at /usr/local/share/perl/5.18.2/Try/Tiny.pm line 76 eval {...} at /usr/local/share/perl/5.18.2/Try/Tiny.pm line 72 Try::Tiny::try('CODE(0x275a590)', 'Try::Tiny::Catch=REF(0x65e4cb8)') called at /usr/share/perl5/Dancer/Route.pm line 191 Dancer::Route::run('Dancer::Route=HASH(0x5b40ca0)', 'Dancer::Request=HASH(0x2266fb0)') called at /usr/share/perl5/Dancer/Renderer.pm line 135 Dancer::Renderer::try {...} at /usr/local/share/perl/5.18.2/Try/Tiny.pm line 81 eval {...} at /usr/local/share/perl/5.18.2/Try/Tiny.pm line 72 Try::Tiny::try('CODE(0x60a4458)', 'Try::Tiny::Catch=REF(0x65e4ac0)') called at /usr/share/perl5/Dancer/Renderer.pm line 144 Dancer::Renderer::get_action_response('Dancer::Renderer') called at /usr/share/perl5/Dancer/Renderer.pm line 31 Dancer::Renderer::render_action('Dancer::Renderer') called at /usr/share/perl5/Dancer/Handler.pm line 84 Dancer::Handler::try {...} at /usr/local/share/perl/5.18.2/Try/Tiny.pm line 76 eval {...} at /usr/local/share/perl/5.18.2/Try/Tiny.pm line 72 Try::Tiny::try('CODE(0x1b5cfa8)', 'Try::Tiny::Catch=REF(0x60a4350)') called at /usr/share/perl5/Dancer/Handler.pm line 113 Dancer::Handler::render_request('Dancer::Request=HASH(0x2266fb0)') called at /usr/share/perl5/Dancer/Handler.pm line 76 Dancer::Handler::handle_request('Dancer::Handler::PSGI=HASH(0x5f3f150)', 'Dancer::Request=HASH(0x2266fb0)') called at /usr/share/perl5/Dancer/Handler.pm line 123 Dancer::Handler::ANON('HASH(0xe4e720)') called at bin/app.pl line 0 eval {...} at bin/app.pl line 0

I do have PCRE enabled. I'm sure of this because PCRE=True on install, and I'm not getting the warning.

Any thoughts? I can obviously just ignore, but I want to make sure I'm not creating a race condition, and I also just want nice clean code.

Upvotes: 1

Views: 206

Answers (1)

yahermann
yahermann

Reputation: 1569

Answering my own question, the problem seems to be triggered by an exception within forward. Adding:

 perl-no-die-catch = true

to the uwsgi vassal initialization file appears to fix the problem.

Upvotes: 1

Related Questions