Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: A Guide to Installing Modules

by PodMaster (Abbot)
on Nov 08, 2002 at 11:54 UTC ( [id://211415]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: A Guide to Installing Modules
in thread A Guide to Installing Modules

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.

Replies are listed 'Best First'.
Re^4: A Guide to Installing Modules
by Aristotle (Chancellor) on Nov 10, 2002 at 14:45 UTC
    I looked into it some further using the following:
    #!/usr/bin/perl -w use strict; use ExtUtils::Installed; my $inst = ExtUtils::Installed->new(); print map "$_\n", @ARGV ? map $inst->files($_), @ARGV : $inst->modules(); __END__
    I got the same pathless reply for any module I checked - bar Perl itself. All additional modules were installed using CPAN. In reply to your requests:

    Makeshifts last the longest.

Re^4: A Guide to Installing Modules
by Aristotle (Chancellor) on Nov 09, 2002 at 19:12 UTC
    Hmm. On my 5.6.1 it looks like this:
    Magick.so Magick.pm autosplit.ix Magick.bs Image::Magick.3
    Not really suitable to feed it into unlink..

    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://211415]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2025-06-13 19:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.