This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make the test more portable.
[perl5.git] / t / lib / tie-push.t
CommitLineData
a60c0954
NIS
1#!./perl
2
3BEGIN {
4 chdir 't' if -d 't';
93430cb4 5 unshift @INC, '../lib';
a60c0954
NIS
6}
7
8{
9 package Basic;
10 use Tie::Array;
11 @ISA = qw(Tie::Array);
12
13 sub TIEARRAY { return bless [], shift }
14 sub FETCH { $_[0]->[$_[1]] }
15 sub STORE { $_[0]->[$_[1]] = $_[2] }
16 sub FETCHSIZE { scalar(@{$_[0]}) }
17 sub STORESIZE { $#{$_[0]} = $_[1]-1 }
18}
19
20tie @x,Basic;
21tie @get,Basic;
22tie @got,Basic;
23tie @tests,Basic;
93430cb4 24require "op/push.t"