Subject: | Dancer2::Plugin::LogReport - can't configure a translator |
Date: | Mon, 25 Jan 2016 16:51:46 +0000 |
To: | bug-Log-Report [...] rt.cpan.org |
From: | Paulo A Ferreira <paulo.a.ferreira [...] gmail.com> |
In Dancer2 module I'm using
use Log::Report ();
use Dancer2::Plugin::LogReport 'com_domain_myservice',
mode => 'DEBUG',
native_language => 'pt_PT',
translator => {
charset => "utf-8",
lexicons => ['/home/myservice/LocaleData']
}
;
With this syntax it reports
Not an ARRAY reference at /home/myservice/lib/perl5/Log/Report/Domain.pm
line 48.
$transl = Log::Report::Translator->new(@$transl)
if ref $transl eq 'HASH';
(shouldn't it be %$transl ?)
The dancer2 app runs if I change to this
translator => [
charset => "utf-8",
lexicons => ['/home/myservice/LocaleData']
]
But then when using it on a page/route
[myservice:3938] core @2016-01-25 16:19:15> Entering hook core.error.init
in (eval 144) l. 1
panic: Can't call method "translate" on unblessed reference at
/home/myservice/lib/perl5/Log/Report/Domain.pm line 148.
at /home/myservice/libl5/Dancer2/Plugin/LogReport.pm line 50
Thank you!