Оно явно не будет дружить с psgi так как через print.
Можно вот такое вот использовать для проверки проблемы:
use CGI::Carp qw(fatalsToBrowser set_message);
BEGIN {
sub handle_errors {
my $msg = shift;
print "<h1>Oh gosh</h1>";
print "<p>Got an error: $msg</p>";
}
set_message(\&handle_errors);
}
Это пример из доки. В handle_errors можно сделать die $msg и
посмотреть на результат.
Всем кто что-то делает $SIG{__DIE__} полезно знать про $^S
($EXCEPTIONS_BEING_CAUGHT) из perlvar. Только в psgi приложении это
врядли поможет - там скорее всего есть "глобальный" eval.
On Tue, Nov 17, 2015 at 3:44 AM, Nikolay Mishin <[email protected]> wrote:
> Привет, MoscowPM
>
>
> запускаю plackup -I"../lib" app.psgi (
> https://github.com/mishin/Ftree-cpan/blob/master/cgi-bin/app.psgi)
>
> получаю
>
> The application raised the following error:
>
> Can't call method "set_default_picture" on an undefined value at
> ../lib/Ftree/FamilyTreeGraphics.pm line 72.
>
> and the StackTrace middleware couldn't catch its stack trace, possibly
> because your application overrides $SIG{__DIE__} by itself, preventing the
> middleware from working correctly. Remove the offending code or module that
> does it: known examples are CGI::Carp and Carp::Always.
>
> я правильно понимаю, что мне нужно закомментировать по всем модулям строки
> use CGI::Carp qw(fatalsToBrowser warningsToBrowser); ?
>
> --
> С уважением
> Николай Мишин
> --
> Moscow.pm mailing list
> [email protected] | http://moscow.pm.org
>
--
Best regards, Ruslan.
--
Moscow.pm mailing list
[email protected] | http://moscow.pm.org