Wups... versions:
Show quoted text> perl -E 'say $];'
5.020002
Show quoted text> perl -MConst::Fast -E 'say $Const::Fast::VERSION'
0.014
On Tue, Feb 7, 2017 at 3:47 AM, Bugs in Const-Fast via RT <
bug-Const-Fast@rt.cpan.org> wrote:
Show quoted text>
> Greetings,
>
> This message has been automatically generated in response to the
> creation of a trouble ticket regarding:
> "splice doesn't honor Internals::SvREADONLY",
> a summary of which appears below.
>
> There is no need to reply to this message right now. Your ticket has been
> assigned an ID of [rt.cpan.org #120130]. Your ticket is accessible
> on the web at:
>
>
https://rt.cpan.org/Ticket/Display.html?id=120130
>
> Please include the string:
>
> [rt.cpan.org #120130]
>
> in the subject line of all future correspondence about this issue. To do
> so,
> you may reply to this message.
>
> Thank you,
> bug-Const-Fast@rt.cpan.org
>
> -------------------------------------------------------------------------
> It is possible to modify a const array with splice. Perhaps that should be
> documented e.g. under CAVEATS.
>
> See: Calling splice() on Immutable Arrays
>
http://www.perlmonks.org/?node_id=1167665
>
> From there, a tiny script to reproduce:
>
> #!/usr/bin/perl -w
> use strict;
> use feature qw(:5.10);
> my @a = qw[a simple list];
> Internals::SvREADONLY(@a, 1);
> # splice doesn't care about Internals::SvREADONLY and modifies @a
> splice(@a, 1, 1, qw(not quite readonly));
> # "a not quite readonly list"
> say join ' ', @a;
> # This dies as expected with: Modification of a read-only value attempted
> unshift @a, qw*this is*;
>
--
Peter Valdemar Mørch
http://www.morch.com