NAME

Perl::ToPerl6::Transformer::Variables::FormatHashKeys - Transform bareword hash keys into quoted hash keys

AFFILIATION

This Transformer is part of the core Perl::ToPerl6 distribution.

DESCRIPTION

Anything enclosed in braces should be compilable code in Perl6, and unfortunately bareword hash keys such as %foo{a} are interpreted as %foo{a()}, so when the function a() can't be found, the block fails to compile:

%foo{a} --> %foo{'a'}
%foo{'a'} --> %foo{'a'}

Using angle brackets as in %foo<a> would be more Perl6 style, but this is a change that most people will immediately understand.

Transforms variables outside of comments, heredocs, strings and POD.

CONFIGURATION

This Transformer is not configurable except for the standard options.

AUTHOR

Jeffrey Goff <drforr@pobox.com>

COPYRIGHT

Copyright (c) 2015 Jeffrey Goff

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.