summaryrefslogtreecommitdiff
path: root/objtest
diff options
context:
space:
mode:
Diffstat (limited to 'objtest')
-rwxr-xr-xobjtest21
1 files changed, 21 insertions, 0 deletions
diff --git a/objtest b/objtest
new file mode 100755
index 0000000000..c4e6205bf6
--- /dev/null
+++ b/objtest
@@ -0,0 +1,21 @@
+#!./perl
+
+package OBJ;
+
+@ISA = BASEOBJ;
+
+$main'object = bless {FOO => foo, BAR => bar};
+
+package main;
+
+$object->mymethod("BAR");
+
+mymethod $object "FOO";
+
+#&mymethod($object, "BAR");
+
+sub BASEOBJ'mymethod {
+ local $ref = shift;
+ print ref $ref, "\n";
+ print $ref->{shift}, "\n";
+}