How? Look for functions referenced in the %{PACKAGE_NAME::} hash. Here's an example...
Run giving a package name as argument.#!/usr/local/bin/perl -w # Find all functions in specified package my $pkg = shift; eval "use $pkg; 1" or die "Failed to load $pkg: $@\n"; # print functions while (my ($key, $val) = each %{"${pkg}::"}) { print "$key\n" if defined *{$val}{CODE}; }
Note that we're using some symrefs here (to access the %{"${pkg}::"} hash), so as least that line should be free of strictness.
In reply to Re: query for methods?
by ariels
in thread query for methods?
by ph0enix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |