Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Update dependants if installed (was: Update these modules if installed?)

by tobyink (Canon)
on Mar 09, 2020 at 08:48 UTC ( [id://11114003]=note: print w/replies, xml ) Need Help??


in reply to Update dependants if installed (was: Update these modules if installed?)

There's a "conflicts" key available in META.json:

... "runtime": { "requires": { ... }, "conflicts": { "Log::ger::Some::Plugin": "< 0.5", "Log::ger::Other::Plugin": "< 0.3" } }

However, as far as I'm aware, CPAN clients don't actually look at this information and use it to upgrade stuff. Your Makefile.PL (or a script in your test suite) could look at it though, and perhaps spit out some very visible warnings.

  • Comment on Re: Update dependants if installed (was: Update these modules if installed?)
  • Download Code

Replies are listed 'Best First'.
Re^2: Update dependants if installed (was: Update these modules if installed?)
by perlancar (Hermit) on Mar 10, 2020 at 00:56 UTC

    Ah yes, perhaps CPAN clients should upgrade on conflicts of "Some::Module < 0.123", although this would still cause a circular dependency failure in the case of upgrading dependants.

    I'm afraid a warn() in Makefile.PL or diag() in a test script will not be seen by many cpanminus users unless they use the verbose (-v) option. And a die() will be annoying.

      Yeah, the lack of feedback to cpanm users is an annoyance.

      Just a random thought; not great, but could be helpful. At configure-time, you could modify your pod to add an "INSTALLATION NOTES" section with text like: "This software was installed on $date at $time. At the time of installation, the following packages were already installed but now need upgrading".

        That's a nice idea and might be helpful to some; will add it to my list of things to consider for updating dependants. Thanks. For now, I'm adding "meta" (API) version checking to Log::ger for the next time this happens. At least users will get a clearer die message instead of some random failure.

Log In?
Username:
Password:

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

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

    No recent polls found