summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/t/lib/tie-push.t
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/t/lib/tie-push.t')
-rwxr-xr-xcontrib/perl5/t/lib/tie-push.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/perl5/t/lib/tie-push.t b/contrib/perl5/t/lib/tie-push.t
new file mode 100755
index 0000000..dd718de
--- /dev/null
+++ b/contrib/perl5/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"
OpenPOWER on IntegriCloud