in reply to A pair of "mathematical" attributes for arrays?
I think that generally a better control over warnings is desirable.
For example if I test if a string has some content I check for defined $str && length $str. It feels clumsy, but a simple $str returns false if the string is "0", and a length $str warns if $str is undef.
In these cases I would want to disable some warnings specifically for a few builtins.
no warnings uninitialized => ['length', 'eq']; would be the p5ish way to express this.
|
|---|