in reply to Re^7: Selecting Ranges of 2-Dimensional Data
in thread Selecting Ranges of 2-Dimensional Data

I checked CPAN, and it seemed like there were no Tie:: modules that cover this niche (BTW, it's interesting how many different Tie::* modules there are), so I just released Tie-Subset. My code from here now has two more working implementations:

use Tie::Subset::Array; sub arr_alias_4 { my ($arr,@i) = @_; tie my @x, 'Tie::Subset::Array', $arr, \@i; return \@x; } use Tie::Subset::Hash; sub hash_alias_4 { my ($hash,@k) = @_; tie my %x, 'Tie::Subset::Hash', $hash, \@k; return \%x; }

Earlier you said:

@_ ... seems to be reliable. Though not many people know if it depends on an implementation detail.

I've included a test in the above distribution that tests it. So it'll be run on CPAN Testers and now we have a canary to see if one of the newer releases of Perl starts breaking the aliasing via \@_ :-)