Can't load file written in perl string normally #45

Closed
moznion opened this Issue Mar 2, 2014 · 2 comments

Comments

Projects
None yet
2 participants

moznion commented Mar 2, 2014

Hi.

If file which target to load contains perl string; like

use utf8;
my $hash = { 東京 => 'tokyo' };

then result of PPI::Document::File->new($file) is undef, means it cannot handle perl string rightly (if I remember correctly, perl implementation allows bare word written in perl string as key of hash).

So I wrote a patch that adds perl string option to constructor.
moznion/PPI@757f382
However I think other better way probably exists.

How do you feel?

Contributor

karenetheridge commented Mar 2, 2014

On Sat, Mar 01, 2014 at 10:31:07PM -0800, Taiki Kawakami wrote:

If file which target to load contains perl string; like

use utf8;
my $hash = { 東京 => 'とうきょう' };

then result of PPI::Document::File->new($file) is undef, means it cannot handle perl string rightly.

Yes, we plan to handle encodings a bit better:

#22
#26

moznion commented Mar 2, 2014

I understood. Thanks a lot.

moznion closed this Mar 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment