Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm converting an old CGI-based program to Plack and the StackTrace stuff is really cool, but it's not showing the first location... only the second.

In other words, I see this:

egad! at MyApp.pm line 267. at /home/user/perl5/Plack/Middleware/HTTPExceptions.pm line 59 1. in Plack::Middleware::HTTPExceptions::transform_error at /home/user +/perl5/Plack/Middleware/HTTPExceptions.pm line 59

The error is triggered at MyApp line 267, but it's just printed out as normal text. The next frame, transform_error() has all the HTML formatting and the "show lexical variables" option, etc.

How can I get it to do the same treatment for the MyApp call though? I do have an eval {} and am catching and rethrowing the error. I tried removing that though and it didn't seem to make a difference.

Thanks

Replies are listed 'Best First'.
Re: Plack::Middleware::StackTrace missing frame
by Anonymous Monk on Apr 30, 2015 at 02:20 UTC

      oh, thanks

      And actually, to make matters worse, the issue appears to be fixed in Plack 1.033 (company is pinned to 1.0031 currently, so I need to get them to upgrade).

      bah, should have tried that first :(

Re: Plack::Middleware::StackTrace missing frame
by Anonymous Monk on Apr 30, 2015 at 01:48 UTC
      No change, but thanks for the thought.

        No change, but thanks for the thought.

        Well, then show some code, like 10-20 lines worth