in reply to Re^2: How do I test the validity of a CODE reference?
in thread How do I test the validity of a CODE reference?
You can inspect any package, as the symbols for My::Package live in the %My::Package:: hash. The easiest way to get at those hashes is via soft references:
use strict; use Data::Dumper; my $package = 'Data::Dumper'; # just as an example { no strict 'refs'; # we're using strings as symbols. Nasty, but con +venient warn Dumper \%{ "$package\::" }; };
|
|---|