summaryrefslogtreecommitdiff
path: root/t/lib/tie-push.t
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1998-01-14 18:49:25 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1998-01-14 18:49:25 +0000
commita60c0954410db87be540ee8439afcd54350bbb8e (patch)
tree1a39a6e0941f3c706efe727a664534cce93143ee /t/lib/tie-push.t
parent1393e20655efb4bcc2062605bfe887dd5e634bc1 (diff)
downloadperl-a60c0954410db87be540ee8439afcd54350bbb8e.tar.gz
TIEARRAY updates - almost works ...
p4raw-id: //depot/ansiperl@424
Diffstat (limited to 't/lib/tie-push.t')
-rwxr-xr-xt/lib/tie-push.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/lib/tie-push.t b/t/lib/tie-push.t
new file mode 100755
index 0000000000..dd718deb14
--- /dev/null
+++ b/t/lib/tie-push.t
@@ -0,0 +1,24 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+{
+ package Basic;
+ use Tie::Array;
+ @ISA = qw(Tie::Array);
+
+ sub TIEARRAY { return bless [], shift }
+ sub FETCH { $_[0]->[$_[1]] }
+ sub STORE { $_[0]->[$_[1]] = $_[2] }
+ sub FETCHSIZE { scalar(@{$_[0]}) }
+ sub STORESIZE { $#{$_[0]} = $_[1]-1 }
+}
+
+tie @x,Basic;
+tie @get,Basic;
+tie @got,Basic;
+tie @tests,Basic;
+require "../t/op/push.t"