On Wednesday, January 29, 2003, at 12:38 PM, Smylers wrote:
That would make the rule very simple indeed:That has merit. One question -- with this approach, attempting to store an C<undef> in an array of int therefore silently succeeds (there's no longer any "converting undef to 0" warning, right, since it would be triggered constantly by this mechanism?)
Assigning C<undef> to an array element causes that element to take the
array's default value.
The effects of this are:
* Assigning a particular integer to an array of int or Int always does
what it looks like it's doing, irrespective of whether or not that
integer is zero or whether the array happens to have a default.
* In an array of Int, attempting to store C<undef> will, by default,
actually store C<undef>. If the array has a different default
defined then that will be stored instead.
* In an array of int, attempting to store C<undef> will, by default,
store zero. If the array has a different default defined then that
will be stored instead.
MikeL