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

Re^3: Why don't some CPAN modules append perllocal?

by syphilis (Archbishop)
on Jan 29, 2023 at 07:53 UTC ( [id://11150011]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Why don't some CPAN modules append perllocal?
in thread Why don't some CPAN modules append perllocal?

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

Replies are listed 'Best First'.
Re^4: Why don't some CPAN modules append perllocal?
by Anonymous Monk on Jan 29, 2023 at 12:37 UTC
    Some modules only have Build.PL, others have both Build.PL and Makefile.PL.
      Some modules only have Build.PL, others have both Build.PL and Makefile.PL

      If there's no Makefile.PL, then it seems you're stuck with building the module using Module::Build - and therefore perllocal will not be updated. (I suppose you could always hack your way around the issue, but that might be tedious.)
      OTOH, if there is a Makefile.PL, then perllocal should be updated if (and only if) you build the module using ExtUtils::MakeMaker,

      Annoyingly, my cpanm installation will use the Build.PL if both Makefile.PL and Build.PL are available.
      Maybe it's possible to reconfigure cpanm to default to using the Makefile.PL when both Makefile.PL and Build.PL are available. (I don't know.)
      I haven't checked to see how the cpan utility handles distros that contain both Makefile.PL and Build.PL.

      Modules that I author have never contained a Build.PL. And, for as long as I have control over them, I intend that they never will contain a Build.PL.

      Cheers,
      Rob
Re^4: Why don't some CPAN modules append perllocal?
by Anonymous Monk on Jan 29, 2023 at 17:27 UTC
    It's hard to believe that a bug in a popular CPAN module can be considered "low priority" and not fixed since 2005, when this bug destroys and renders inconsistent Perl's simple mechanism for recording module installation history. Without perllocal you have to traverse @INC and stat every module file to figure out when they were installed. If a module was edited or something then it becomes very difficult to impossible to tell when it was installed. Is this information stored anywhere else, does the cpan utility keep track of what it has done?

      As far as I have ever been able to tell, the original developers and subsequent maintainers of Module::Build have always considered this more a wishlist item than a bug.

      But as far as I know nobody has cared enough to submit a pull request; it seems at least possible that it would be applied.

        I couldn't find any "official" documentation for perllocal and I doubt there is any standard, since naming it so closely to perllocale would be more than unfortunate.

        If it's a pseudo-standard by some installers/builders, than the next question is, if such a limited static list in POD is a better choice over searching @INC dynamically.

        Hence what's the use-case?

        I have some ideas about that, but most of them would be better covered by cpan and cpanm creating something like YAML or JSON.

        Cheers Rolf
        (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
        Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-03-29 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found