Actually, Perl is correct. $obj->dump() would "work" in your case. There is no difference between a subroutine in a package and a method of an object blessed into said package, at least as far as Perl is concerned. The arrow-call syntax $obj->method(@args) is little more than syntactic sugar around TestPackage::method($obj, @args).
There is no real concept of an interface in Perl other than the documentation of methods of a class/package.
In reply to Re: Finding the interface implemented by an object
by Corion
in thread Finding the interface implemented by an object
by oyse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |