xref: /openbsd-src/gnu/usr.bin/perl/lib/Tie/Array/push.t (revision f6aab3d83b51b91c24247ad2c2573574de475a82)
1#!./perl
2
3BEGIN {
4    chdir 't' if -d 't';
5    @INC = '.';
6    push @INC, '../lib';
7}
8
9{
10 package Basic;
11 use Tie::Array;
12 @ISA = qw(Tie::Array);
13
14 sub TIEARRAY  { return bless [], shift }
15 sub FETCH     { $_[0]->[$_[1]] }
16 sub STORE     { $_[0]->[$_[1]] = $_[2] }
17 sub FETCHSIZE { scalar(@{$_[0]}) }
18 sub STORESIZE { $#{$_[0]} = $_[1]-1 }
19}
20
21tie @x,Basic;
22tie @get,Basic;
23tie @got,Basic;
24tie @tests,Basic;
25require "op/push.t"
26