[Pdx-pm] Getting a list of methods that a package responds to

Eric Wilhelm scratchcomputing at gmail.com
Mon Aug 22 16:23:53 PDT 2005

# from Kyle Dawkins
# on Monday 22 August 2005 02:18 pm:

>because I am looking for certain methods to "register" for use  

Is "certain methods" a finite list (as opposed to a regex match)?  If 
so, you could just see if the object/package can() those methods.

my @can;
foreach my $method (@certain_methods) {
	$package->can($method) and push(@can, $method);

"You can't win. You can't break even. You can't quit."
--Ginsberg's Restatement of the Three Laws of Thermodynamics

More information about the Pdx-pm-list mailing list