That may not help the OP much as it doesn't actually provide a list of methods in the sense that the word 'method' is usually used (a 'function' called with reference to an object instance). Consider the following trivial class with no methods in what I am claiming is the conventional sense:
use warnings; use strict; use Data::Dumper; package test; sub new { my ($class) = @_; return bless {}, $class; } sub Package { return __PACKAGE__; } package main; my $obj = test->new (); { no strict 'refs'; print "Instance METHOD IS " . Dumper( \%{ref ($obj)."::" }) ; }
Prints:
Instance METHOD IS $VAR1 = { 'AUTOLOAD' => *test::AUTOLOAD, 'DESTROY' => *test::DESTROY, 'new' => *test::new, 'Package' => *test::Package };
'AUTOLOAD' and 'DESTROY' are inherited methods. 'new' is a class method and 'Package' is a function in the 'test' package. If you add base classes the results are even more confusing with the ref trick only showing 'methods' in the base classes that have been called already.
In reply to Re^2: list out all methods of object
by GrandFather
in thread list out all methods of object
by vetrivel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |