Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

ExtUtils::Installed and perl5.6.*

by brother ab (Scribe)
on Oct 19, 2001 at 10:57 UTC ( #119892=perlquestion: print w/replies, xml ) Need Help??

brother ab has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks!

You must have heard that format of .packlist files was changed from perl5.005 to perl5.6 - now it lists files without path. May be it is not bad. May be it is even good, I don't know what were reasons to change it.

But look at this spot of code:

use ExtUtils::Installed;
$inst = new ExtUtils::Installed;
@dirs = $inst->directories("Storable");
print "@dirs\n";

I want to know where is my Storable module was installed. What do you think I'll get? Dot! Only dot and nothing more.

Well, I'm not going to discuss ExtUtils::Installed. The question of mine is: how to find all installed module files (not .pm only, but man-files and executables and what-else-was-installed - all together)?

Thanks,

-- brother ab

Replies are listed 'Best First'.
Re: ExtUtils::Installed and perl5.6.*
by Zecho (Hermit) on Oct 19, 2001 at 12:33 UTC

      Yes, I read that before I ask.

      To be understood right: I don't want to know what modules are installed, I want to know where do they put their files.

      Solutions with directories scanning could be possible if all modules would install files inside Perl hierarchy only. But some of them e.g install executables in /usr/local/bin or /usr/bin and so on. I do could scan, but not all my filesystems!

      -- brother ab
Re: ExtUtils::Installed and perl5.6.*
by alien_life_form (Pilgrim) on Oct 19, 2001 at 13:56 UTC
    Greetings.

    require Storable; #quotes required to turn off concatenation behavior of '.' print $INC{'Storable.pm'},"\n";
    Cheers,
    alf

      Well, what about other than .pm files? Taken Storable as an example, installation consists of 20 (sic!) files and only one of them is .pm, others are: splitted for autoloading subs (.al files and autosplit.ix) and compiled from C (.bs and .so). And it is good enough that all of them are inside Perl hierarchy, sometimes it is not the case.

      -- brother ab

        Greetings.

        Perhaps, if you explained what is the purpose of your endeavour, somebody could come up with a solution.

        As things are, a combination of what I suggested, plus ExtUtils::Installed::files, plus the knowledge of the (standard) layout of the perl library should get you pretty close to what you're looking for.

        Cheers,
        alf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://119892]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2021-05-14 18:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (150 votes). Check out past polls.

    Notices?