Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Update these modules if installed?

by syphilis (Bishop)
on Mar 09, 2020 at 06:07 UTC ( #11113994=note: print w/replies, xml ) Need Help??


in reply to Re^2: Update these modules if installed?
in thread Update dependants if installed (was: Update these modules if installed?)

adding them to the list of prereqs will trigger a circular dependency

It's only a problem if those prereqs themselves specify a version of Log::ger that's newer than the Log::ger that's currently installed. (And there must be a Log::ger that's "currently installed", or the "list of prereqs" would be empty.)
So, I guess that's the issue.

IIUC, your question could therefore be generalized as:
"How do I, as maintainer of both the Foo and Bar modules, ensure that Bar, which is dependant upon Foo, is automatically updated whenever Foo is updated ?"
Maybe just bundle Foo and Bar into the same distro ? (I think that would be the "approved" method, though I wouldn't like to assert that it's always desirable.)

Other than that, I can't really think of anything that hasn't already been mentioned.

Cheers,
Rob
  • Comment on Re^3: Update these modules if installed?

Replies are listed 'Best First'.
Re^4: Update these modules if installed?
by perlancar (Friar) on Mar 10, 2020 at 01:04 UTC
    IIUC, your question could therefore be generalized as: "How do I, as maintainer of both the Foo and Bar modules, ensure that Bar, which is dependant upon Foo, is automatically updated whenever Foo is updated ?"

    More precisely, "How do I, as maintainer of both the Foo and Bar modules, ensure that Bar, which is dependant upon Foo, is automatically updated when there is a new version Foo that is backward incompatible, which sometimes happens?" Which of course is also solved by putting Foo and Bar in the same distro :-)

    It's only a problem if those prereqs themselves specify a version of Log::ger that's newer than the Log::ger that's currently installed. (And there must be a Log::ger that's "currently installed", or the "list of prereqs" would be empty.) So, I guess that's the issue.

    Which will be the case everytime. Say the user currently has Log::ger 0.032 and Log::ger::Plugin::Foo 0.001 (which depends on Log::ger 0.027). She wants to upgrade to Log::ger 0.033. This version is backward incompatible with 0.032 and I have also released Log-ger-Plugin-Foo 0.002 which depends on Log::ger 0.033. Now suppose Log::ger 0.033 adds Log::ger::Plugin::Foo 0.002 as a prereq to trigger its update. This will also instruct CPAN client to install Log::ger 0.033 and that's when it complains with circular dependency problem, because Log::ger 0.033 is not installed yet.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2020-05-31 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?