in reply to Re^7: Negative array subscript method call bug?
in thread Negative array subscript method call bug?

With 5.8.1+, you can set $NEGATIVE_INDICES in your tied class to suppress the FETCHSIZE and just pass -1 to FETCH.
  • Comment on Re^8: Negative array subscript method call bug?

Replies are listed 'Best First'.
Re^9: Negative array subscript method call bug?
by BrowserUk (Patriarch) on Aug 09, 2004 at 19:40 UTC

    Neat. I missed that development.

    What I'd really like is a SLICE entrypoint for ties.

    package MyTie::Array; ... sub SLICE { my( $self, @list ) = @_; ... return @newlist; }

    And the same for hashes. It would make using slices on tied structures much more efficient. Slices could also be subverted for other things when the actual data being represented isn't exactly an array or hash.

    The other one I'd like is a SUBSTR{} entrypoint for tied scalars.

    Of course, if I was any good, I'd write the patches for these, but I think I am more likely to become fluent in conversational Manderin by reading takeout boxes:(


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon