{"action":"closed","issue":{"url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/1225","repository_url":"https://api.github.com/repos/PerlDancer/Dancer2","labels_url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/1225/labels{/name}","comments_url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/1225/comments","events_url":"https://api.github.com/repos/PerlDancer/Dancer2/issues/1225/events","html_url":"https://github.com/PerlDancer/Dancer2/issues/1225","id":169605473,"number":1225,"title":"Dancer2::Plugin::LogReport breaks after Dancer2 upgrade from 0.200003","user":{"login":"biafra","id":21327,"avatar_url":"https://avatars.githubusercontent.com/u/21327?v=3","gravatar_id":"","url":"https://api.github.com/users/biafra","html_url":"https://github.com/biafra","followers_url":"https://api.github.com/users/biafra/followers","following_url":"https://api.github.com/users/biafra/following{/other_user}","gists_url":"https://api.github.com/users/biafra/gists{/gist_id}","starred_url":"https://api.github.com/users/biafra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biafra/subscriptions","organizations_url":"https://api.github.com/users/biafra/orgs","repos_url":"https://api.github.com/users/biafra/repos","events_url":"https://api.github.com/users/biafra/events{/privacy}","received_events_url":"https://api.github.com/users/biafra/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PerlDancer/Dancer2/labels/Bug","name":"Bug","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-05T13:20:02Z","updated_at":"2016-09-22T15:43:15Z","closed_at":"2016-09-22T15:43:15Z","body":"After upgrading to 0.201000 using the LogReport plugin in other modules crashed with:\r\n\r\nCan't call method \"app\" on an undefined value at /home/dancer2/lib/perl5/Dancer2/Plugin.pm line 486.\r\n\r\nI'm using it essencially to internationalization and logging.\r\n\r\nI created a test app with\r\n\r\n$ dancer2 gen -a MyApp\r\n\r\nand then edited lib/MyApp.pm as\r\n\r\n```\r\npackage MyApp;\r\n\r\nuse Log::Report ();\r\n\r\nuse Dancer2;\r\nuse Dancer2::Plugin::LogReport 'com_xpto', mode => 'DEBUG';\r\n\r\nuse MyModule;\r\n\r\nour $VERSION = '0.1';\r\n\r\nget '/' => sub {\r\n    template 'index';\r\n};\r\n\r\ntrue;\r\n\r\n```\r\n\r\nand MyModule.pm like this:\r\n\r\n```\r\npackage MyModule;\r\n\r\nuse Log::Report ();\r\n\r\nuse Dancer2;\r\n\r\nuse Dancer2::Plugin::LogReport 'com_xpto', mode => 'DEBUG';\r\n\r\n1;\r\n\r\n```\r\n\r\nThis is the error when you try to run it:\r\n\r\n```\r\ndancer2@ankh-morpork:~/MyApp$ perl bin/app.psgi \r\nPlugin DSL method 'hook' is deprecated. Use '$self->app->add_hook' instead'.\r\n at /home/dancer2/MyApp/bin/../lib/MyApp.pm line 6.\r\nPlugin DSL method 'hook' is deprecated. Use '$self->app->add_hook' instead'.\r\n at /home/dancer2/MyApp/bin/../lib/MyApp.pm line 6.\r\ntrace: switching to run mode 3 for Log::Report::Dispatcher::Callback, accept ALL\r\ntrace: switching to run mode 3 for Log::Report::Dispatcher::Perl, accept ALL\r\ntrace: switching to run mode 3 for Log::Report::Dispatcher::Callback, accept ALL\r\nCan't call method \"app\" on an undefined value at /home/dancer2/lib/perl5/Dancer2/Plugin.pm line 486.\r\nBEGIN failed--compilation aborted at /home/dancer2/MyApp/bin/../lib/MyModule.pm line 7.\r\nCompilation failed in require at /home/dancer2/MyApp/bin/../lib/MyApp.pm line 8.\r\nBEGIN failed--compilation aborted at /home/dancer2/MyApp/bin/../lib/MyApp.pm line 8.\r\nCompilation failed in require at bin/app.psgi line 8.\r\nBEGIN failed--compilation aborted at bin/app.psgi line 8.\r\n\r\n```\r\n\r\nAfter reinstalling 0.200003 it worked smoothly.\r\n\r\nThank you!\r\n"}}
{"actor":{"display_login":"xsawyerx"}}