Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Why don't some CPAN modules append perllocal?

by Anonymous Monk
on Jan 29, 2023 at 02:15 UTC ( [id://11150003]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

perl -MExtUtils::Installed -le '$_=ExtUtils::Installed->new->modules;p +rint'
1650
perl -le '@_=grep/Module/,split/\n/,`perldoc -uT perllocal`;print scal +ar@_'
1472
perl -MExtUtils::Installed -le '@_=ExtUtils::Installed->new->modules;p +rint for sort{lc$a cmp lc$b}@_' >mod.ext perl -e '@_=grep/Module/,`perldoc -uT perllocal`;for(@_){s/.*?\|([^>]+ +)>/$1/}print for sort{lc$a cmp lc$b} @_' >mod.loc diff -y mod.ext mod.loc

diff -y mod.ext mod.loc|grep '<'|wc -l
232
diff -y mod.ext mod.loc|grep '>'|wc -l
54

Replies are listed 'Best First'.
Re: Why don't some CPAN modules append perllocal?
by hippo (Archbishop) on Jan 29, 2023 at 12:16 UTC

    Because some CPAN modules use Module::Build to install themselves and as was discussed recently Module::Build doesn't write to perllocal.


    🦛

Re: Why don't some CPAN modules append perllocal?
by syphilis (Archbishop) on Jan 29, 2023 at 04:07 UTC
    Can you provide examples of some that don't append perllocal ?

    These days I build perl such that the different architectures sit alongside each other.
    This means that any (pure perl) module that gets installed into perl/site/lib is immediately accessible to all architectures.
    But the only perllocal that gets appended is the one for the architecture I was actually running when I installed that pure perl module.
    Hence, the perllocals for all but one of those architectures will not mention this pure perl module, even though the module is accessible to *all* of the different architectures.
    OTOH, it seems that ExtUtils::Installed is aware of all of the modules that have been installed - not just those modules that were appended to perllocal.
    I don't know if that is relevant to what you are seeing.

    Cheers,
    Rob
        I hypothesize that if the module is built and installed using ExtUtils::MakeMaker (Makefile.PL) then perllocal gets updated.
        But if the module is built and installed using Module::Build (Build.PL) then perllocal does not get updated.
        If you can locate a module in that list you provided that does not provide a Build.PL file, then obviously my hypothesis is an unsatisfactory one. (Either it's plain wrong, or there are other factors involved.)

        I can definitely see the message "Appending installation info to D:\perl .../perllocal.pod" when the Makefile.PL gets run, but no such equivalent message when Build.PL gets run.
        But I've only looked at a very small sample ... and I've just now found this very pertinent bug report.

        Cheers,
        Rob
Re: Why don't some CPAN modules append perllocal?
by Anonymous Monk on Jan 29, 2023 at 08:31 UTC
    how were the modules installed, cpan or package manager? is it the system perl or perlbrew?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11150003]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-07-21 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.