The keys in the hash will be in the form Foo/Bar.pm, but you can fix that with a simple regex. Then you can do your cleanup. For example:
for my $file (keys %INC) { (my $class = $file) =~ s!/!::!g; $class =~ s/\.pm$//; if ($class->can('clean_up')) { $class->clean_up; } }
In reply to Re: finding all modules used from a script
by btrott
in thread finding all modules used from a script
by d_i_r_t_y
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |