This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/io/binmode.t
[perl5.git] / t / op / universal.t
index a67c77f..efda2a5 100755 (executable)
@@ -68,7 +68,7 @@ test ! $a->can("sleep");
 test my $ref = $a->can("drink");        # returns a coderef
 test $a->$ref("tea") eq "drinking tea"; # ... which works
 test $ref = $a->can("sing");
-eval { $a->sing };
+eval { $a->$ref() };
 test $@;                                # ... but not if no actual subroutine
 
 test (!Cedric->isa('Programmer'));