I
Ivan Shmakov
Do I understand it correctly that no Perl program could discern
$a from $b, as long as ($a eq $b && ref ($a) eq ref ($b)) holds?
(In particular, isn't there a certain module which allows one to
peek into the Perl value's internal representation, such as
whether the value has the "number" and "string" parts?)
The context is that I'm implementing a span to value mapping,
and wonder if I could allow the code to optimize, say:
$map->set ($a, $b, $value); # $a < $b < $c < $d
$map->set ($c, $d, $value);
$map->set ($b, $c, $value);
so that $map will internally hold the same information as if a
single ->set ($a, $d, $value) was performed.
TIA.
$a from $b, as long as ($a eq $b && ref ($a) eq ref ($b)) holds?
(In particular, isn't there a certain module which allows one to
peek into the Perl value's internal representation, such as
whether the value has the "number" and "string" parts?)
The context is that I'm implementing a span to value mapping,
and wonder if I could allow the code to optimize, say:
$map->set ($a, $b, $value); # $a < $b < $c < $d
$map->set ($c, $d, $value);
$map->set ($b, $c, $value);
so that $map will internally hold the same information as if a
single ->set ($a, $d, $value) was performed.
TIA.