Find the answer to your Linux question:
Results 1 to 2 of 2
good day dear linux-experts how to check which perl stuff (modules) is running on my opensuse 12.3 note - i sometimes was being forced to install via repo the method ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    May 2013
    Posts
    182

    which perl stuff (modules) i run on my linux-system


    good day dear linux-experts


    how to check which perl stuff (modules) is running on my opensuse 12.3
    note - i sometimes was being forced to install via repo

    the method to instal via cpan was being looked very very "harmful".


    at the console
    perl -MCPAN -e shell
    on first run you'll need to configure it, just follow defaults, get local repositories

    so if we want to install - for example this one we go like this


    cpan> install HTML::TreeBuilder::LibXML
    and we should be good, or the package manager may allow you to install Perl modules as well


    Again the questions: how to check which Perl-Module are installed!?


    update;:


    btw should i install a special kind of extension / perl module to get infos about my system

    PHP Code:

    pmall

    More info via perldoc 
    -/usr/bin/pmall 

    well to reach the reslults you write

    - do i need a special perl- module from cpan

    PHP Code:
    martin@linux-70ce:~>  perl -'print "$_ \n" foreach @INC'
    /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi
    /usr/lib/perl5/site_perl/5.16.2
    /usr/lib/perl5/vendor_perl/5.16.2/i586-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.16.2
    /usr/lib/perl5/5.16.2/i586-linux-thread-multi
    /usr/lib/perl5/5.16.2
    /usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi
    /usr/lib/perl5/site_perl/5.16.2
    /usr/lib/perl5/site_perl
    .
    martin@linux-70ce:~> 
    hmmm this is abit crazy isn t it?



    perl -e 'print "rpm -qf $_\n" foreach @INC'|/bin/sh|sort -u
    [/QUOTE]


    PHP Code:
    o conf commit
    martin
    @linux-wyee:~/php>   firefox -repl
    martin
    @linux-wyee:~/phpperl -'print "rpm -qf  $_\n" foreach @INC'|/bin/sh|sort -u
    file 
    /home/martin/php is not owned by any package
    perl
    -5.16.0-3.5.1.i586
    perl
    -base-5.16.0-3.5.1.i586
    perl
    -B-Utils-0.21-2.1.2.i586
    perl
    -Class-C3-XS-0.13-12.1.2.i586
    perl
    -Class-Load-XS-0.04-4.1.2.i586
    perl
    -Data-Dump-Streamer-2.33-2.1.2.i586
    perl
    -Devel-GlobalDestruction-0.04-3.1.1.i586
    perl
    -Digest-MD4-1.5-154.1.2.i586
    perl
    -Digest-SHA1-2.13-11.1.2.i586
    perl
    -gettext-1.05-157.1.2.i586
    perl
    -HTML-Parser-3.69-12.1.2.i586
    perl
    -HTTP-Server-Simple-0.44-2.1.1.i586
    perl
    -List-MoreUtils-0.33-2.1.2.i586
    perl
    -Moose-2.0602-2.1.2.i586
    perl
    -Net-DBus-1.0.0-3.1.2.i586
    perl
    -Net-LibIDN-0.12-9.1.2.i586
    perl
    -Net-SSLeay-1.42-3.1.2.i586
    perl
    -Package-Stash-XS-0.25-4.1.2.i586
    perl
    -PadWalker-1.92-12.1.2.i586
    perl
    -Params-Util-1.07-2.1.2.i586
    perl
    -Sub-Name-0.05-21.1.2.i586
    perl
    -Task-Weaken-1.04-14.1.1.i586
    perl
    -Test-Exception-0.31-13.1.1.i586
    perl
    -Text-CSV_XS-0.87-2.1.2.i586
    perl
    -Unicode-Map-0.112-6.1.2.i586
    perl
    -Variable-Magic-0.48-2.1.2.i586
    perl
    -X11-Protocol-0.56-7.1.1.i586
    perl
    -XML-LibXML-1.95-4.1.2.i586
    perl
    -XML-NamespaceSupport-1.11-15.1.1.i586
    perl
    -XML-Parser-2.41-15.1.2.i586
    martin
    @linux-wyee:~/php
    ONE QUESTION LEFT: does this show all (!!!) the perl-module-stuff on the whole machine!?

    ps this board is top notch i love it. keep it up!!

    greetings so much!! i find answers which i normally do not find. and i must confess that i love this site !!

    greetings sayhello
    Last edited by sayhello; 06-22-2013 at 04:18 PM.

  2. #2
    Linux Newbie
    Join Date
    May 2013
    Posts
    182
    hi

    @ the admins / mods

    just wanted to edit the posting - but found it not editable .

    perhaps i was out of time with this idea!?

    well - it is pretty useful to run this one command:


    one can use the CPAN 'r' command for this. You can get into the CPAN shell with the old style:

    sudo perl -MCPAN -e shell

    or, on most newer systems, there is a 'cpan' command, so this command will get you to the shell


    or another way is to go this way:



    and a just very very hacky way to do it in *nix world,
    you'll get some stuff you don't really care about (ie: warnings::register etc),
    but it should give you a list of every .pm file that's accessible via perl.

    PHP Code:
    for my $path (@INC) {
        
    my @list = `ls -R $path/**/*.pm`;
        for (@list) {
            
    s/$path\///g;
            
    s/\//::/g;
            
    s/\.pm$//g;
            
    print;
        }


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •