in reply to Discovering Loaded Modules
use strict; use warnings; sub visit { my ($parent, $table) = @_; for (keys(%$table)) { if (my ($trimmed) = /^(.*)::\z/s) { next if $_ eq 'main::'; print("$parent$trimmed\n"); visit("$parent$_", $table->{$_}); } } } visit('', \%::);
The presence of &new, @ISA or &DESTROY would be a good indicator that the package is a class.
|
|---|