|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re: A pair of "mathematical" attributes for arrays?by tsee (Curate) |
| on Sep 11, 2007 at 09:48 UTC ( #638267=note: print w/ replies, xml ) | Need Help?? |
|
I'm not suggesting that you actually use this, but the following is a simple implementation of the :zero (here :ZeroDefault) attribute. It's intended to show you that what you would like to have is quite easy to implement in pure Perl without changing the interpreter at all or writing a single line of XS/C. All the usual attribute-gotchas apply. All the usual tie() gotchas apply, too. (Slowness, for example.)
Of course, this is just a hack and I haven't tested it thoroughly. Cheers,
In Section
Meditations
|
|
||||||||||||||||||||