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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|