summaryrefslogtreecommitdiff
path: root/foo
diff options
context:
space:
mode:
authorLarry Wall <larry@netlabs.com>1994-03-18 00:00:00 +0000
committerLarry Wall <larry@netlabs.com>1994-03-18 00:00:00 +0000
commit8990e3071044a96302560bbdb5706f3e74cf1bef (patch)
tree6cf4a58108544204591f25bd2d4f1801d49334b4 /foo
parented6116ce9b9d13712ea252ee248b0400653db7f9 (diff)
downloadperl-8990e3071044a96302560bbdb5706f3e74cf1bef.tar.gz
perl 5.0 alpha 6
[editor's note: cleaned up from the September '94 InfoMagic CD, just like the last commit]
Diffstat (limited to 'foo')
-rwxr-xr-xfoo19
1 files changed, 9 insertions, 10 deletions
diff --git a/foo b/foo
index 8977a2650b..c2f7b43fb3 100755
--- a/foo
+++ b/foo
@@ -1,12 +1,11 @@
#!./perl
-tie ( @a, TST_tie, "arg1", "arg2" );
-$a[2]=[1];
-
-package TST_tie;
-
-sub new { bless []; }
-
-sub fetch { print "store @_\n" }
-sub store { print "store @_\n" }
-sub delete { print "store @_\n" }
+# Multiple Inheritence (get rich quick :-)
+ {
+ package OBJ2; sub abc { print "abc\n"; }
+ package OBJ3; sub def { print "def\n"; }
+ package OBJ4; @ISA = ("OBJ2", "OBJ3");
+ $x = bless { foo => bar };
+ $x->abc; # prints ``abc''
+ $x->def; # prints ``def''
+ }