Using embPerl 2.5.0, porting an application from Ubuntu 12.04, perl 5.14,
Readonly 2.0.0 to Ubuntu 18.04, perl 5.26, Readonly 2.05
If I have a Readonly hash like this:
[.-
use Readonly;
Readonly our %LETTERS => {
"A" => "Letter A",
"B" => "Letter B",
"C" => "Letter C"
}
-]
and I try to use it like this:
[$ foreach $letter (keys %LETTERS) $]
[+ $LETTERS{$letter} +]
[$ endforeach $]
That works with the older versions and doesn't with the newer. With the
newer version nothing is output. If I do something to force it to be
evaluated, like:
[$ foreach $letter (keys %LETTERS) $]
[+ eval { $LETTERS{$letter} } +]
[$ endforeach $]
It does output "LETTER A", etc. in both versions.
Any explanation of what's happening or suggestions on how to best deal with
it?
Readonly 2.0.0 to Ubuntu 18.04, perl 5.26, Readonly 2.05
If I have a Readonly hash like this:
[.-
use Readonly;
Readonly our %LETTERS => {
"A" => "Letter A",
"B" => "Letter B",
"C" => "Letter C"
}
-]
and I try to use it like this:
[$ foreach $letter (keys %LETTERS) $]
[+ $LETTERS{$letter} +]
[$ endforeach $]
That works with the older versions and doesn't with the newer. With the
newer version nothing is output. If I do something to force it to be
evaluated, like:
[$ foreach $letter (keys %LETTERS) $]
[+ eval { $LETTERS{$letter} } +]
[$ endforeach $]
It does output "LETTER A", etc. in both versions.
Any explanation of what's happening or suggestions on how to best deal with
it?