If the module was installed in a normal fashion (perl Makefile.PL ...), it should've left a .packlist file.
Then you just use ExtUtils::Installed (you could use File::Find, but why go through the trouble when somebody already done it)
use ExtUtils::Installed;
my $inst = ExtUtils::Installed->new();
print "$_\n" for $inst->files('CGI');
=head1 on my machine, I get
C:\Perl\lib\CGI\Util.pm
C:\Perl\lib\CGI\Cookie.pm
C:\Perl\lib\CGI.pm
C:\Perl\lib\CGI\Push.pm
C:\Perl\lib\CGI\Pretty.pm
C:\Perl\lib\CGI\Fast.pm
C:\Perl\lib\CGI\Carp.pm
C:\Perl\lib\CGI\Switch.pm
C:\Perl\lib\CGI\Apache.pm
=cut
# and now for the "deletion" part
print "unlinking ", unlink( $inst->files('CGI') );
update:
Hmm, works just fine for me on various perls/systems, what exactly did you try, and what version of ExtUtils::Packlist/ExtUtils::Installed do you have?
How did you install Image::Magick?
I have used CPAN to install modules and tested this, and it all works out as expected. I suspect one of the ExtUtils modules you're using is messed up. Seeing how you're still getting a file list, a workaround is easy (use File::Find to locate those files in @INC and acquire absolute paths).
____________________________________________________ ** The Third rule of perl club is a statement of fact: pod is sexy. |