Acme-Playpen
view release on metacpan or search on metacpan
lib/Tupelo/Munge.pm view on Meta::CPAN
kinds of operations are intended to be possible on tuples, and there is no
established common practice, so the semantics offered by this module are
in part guesses. For example, rewriting a tuple in a way that changes
the number of slots it has is something that's naturally possible to do
with the data structure, but isn't ever performed by core code, and it
might be decided in the future that it should never happen to a tuple
beyond its initial construction.
The mutability semantics offered by this module are particularly
speculative. As of Perl 5.37.10, the Perl core neither sets nor honours
the read-only flag that this module uses. It is not possible to discern
in what situations the core intends tuples to be mutable, because the core
code is not self-consistent on this point: it assumes that slot values
will not change in situations in which it can actually change them.
When some coherent semantics are decided upon for the core, it should
be possible to achieve cooperation between this module and the core,
and this module might also change behaviour on the buggy Perl versions
to get closer to the consensus semantics.
=cut
lib/Tupelo/Munge.pm view on Meta::CPAN
tuple just as it will any other object, it refuses to bless a tuple that
is already blessed. It permits reblessing of objects other than tuples,
and so is discriminating against tuples. This prohibition appears to
be a result of concern for the integrity of classes of the core class
system, but isn't actually justified by such concerns. (It was added
alongside the prohibition on manually blessing into classes of the core
class system, a prohibition which is justified by such concerns.)
As of Perl 5.37.10, the Perl core provides no coherent semantics regarding
the mutability of tuples. It does not enforce immutability, by looking at
any flag attached to a tuple. This means that the immutability offered
by this module can be violated by exploiting core features. But the
core also assumes in some situations that tuples will not be mutated.
This immutability assumed by the core can be violated by the use of this
module, or by exploiting core features without any use of this module.
=head1 SEE ALSO
L<Scalar::Construct>
=head1 AUTHOR
( run in 3.723 seconds using v1.01-cache-2.11-cpan-94b05bcf43c )