Subject: | Import fails with constant arguments |
Date: | Wed, 24 May 2017 19:25:52 +0000 |
To: | "bug-Kavorka [...] rt.cpan.org" <bug-Kavorka [...] rt.cpan.org> |
From: | Aaron Priven <APriven [...] actransit.org> |
Thanks so much for Kavorka, it is so much better to be able to validate things this way.
I did find something I think should have worked, although I realize locked hashes are weird. It reduces down as follows:
#####
## This works:
use 5.024;
my %hash = (
x => [ fun => { -as => 'func' } ],
);
require Kavorka;
Kavorka->import( $hash{'x'}->@* );
## This does not:
use 5.024;
use Const::Fast;
const my %CONST_HASH => (
x => [ fun => { -as => 'func' } ],
);
require Kavorka;
Kavorka->import( $CONST_HASH{'x'}->@* );
#####
The error is:
Attempt to access disallowed key 'implementation' in a restricted hash at .../Kavorka.pm line 99.
Perhaps not the most urgent bug ever, but...
--
Aaron Priven , Service Information Administrator
Alameda-Contra Costa Transit District (AC Transit)
1600 Franklin St., Oakland, CA USA 94612 / +1 510 891 4865