среда, 9 сентября 2015 г.

Unknown encoding 'UTF-16BE

I'm decided to create portable https://metacpan.org/pod/release/MISHIN/FamilyTreeInfo-2.3.19/lib/Ftree.pod
and got error:

The application raised the following error: Unknown encoding 'UTF-16BE' at C:/Ftree-portable/lib/DataParsers/ExcelFormat.pm line 100. 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.

I'm decided error with copy
this module
c:\test_app\strawberry-perl-5.20.0.1-64bit-portable\perl\lib\Encode\Unicode.pm
c:\test_app\strawberry-perl-5.20.0.1-64bit-portable\perl\lib\Encode\Unicode\UTF7.pm
to my distribution

Waw!

среда, 2 сентября 2015 г.

My universal debugger on perl


use FindBin '$RealBin';
use Log::Log4perl qw(:easy);
my $log_file = $RealBin . "/show_image.log";
#Init logging
Log::Log4perl->easy_init(
{ level => $DEBUG,
file => ":utf8>>$log_file",
layout => '%d %p> %m%n'
}
);
my $msg = qq{image name is $picture_directory/$id.jpg};
INFO($msg);
view raw debug.pl hosted with ❤ by GitHub
Simply put output to log file. Voilà.