This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Note why pp_tie can't use call_method() for a package name.
[perl5.git] / t / op / tie.t
index 38c5cff..5628694 100644 (file)
@@ -929,3 +929,11 @@ print "fetch=$fetch\ncalled=$called\n";
 EXPECT
 fetch=2
 called=2
+########
+# tie mustn't attempt to call methods on bareword filehandles.
+sub IO::File::TIEARRAY {
+    die "Did not want to invoke IO::File::TIEARRAY";
+}
+fileno FOO; tie @a, "FOO"
+EXPECT
+Can't locate object method "TIEARRAY" via package "FOO" at - line 5.