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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Outside of code tags, you may need to use entities for some characters:
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|