Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Why don't some CPAN modules append perllocal?

by Anonymous Monk
on Jan 29, 2023 at 02:15 UTC ( #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'
perl -le '@_=grep/Module/,split/\n/,`perldoc -uT perllocal`;print scal +ar@_'
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
diff -y mod.ext mod.loc|grep '>'|wc -l

Replies are listed 'Best First'.
Re: Why don't some CPAN modules append perllocal?
by hippo (Bishop) 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.

        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.

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?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2023-06-06 02:26 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (26 votes). Check out past polls.