Carton...:Update(3pm)
π Carton::Doc::Update β Update the dependencies π
ok bestie, you found it β the Carton...:Update(3pm) page, straight outta the User Contributed Perl Documentation section. this is the one about updating your deps, and it's lowkey iconic. let's go π«Ά
β¨ SYNOPSIS β¨
carton update [module]
that's it. that's the whole vibe. one command, optional module, boom π
πΈ DESCRIPTION πΈ
so like, what does it even do? it updates the dependencies version for your application. simple as that, no cap.
now here's the part that makes Carton kind of a queen π: Carton is designed to update your dependency in a conservative way. meaning β and this is the important bit β it doesn't update modules that aren't explicitly required to be updated. she's not out here changing your whole life for no reason. she minds her business. periodt.
carton update is the command you reach for when you do wanna explicitly update one or all of the modules in your cpanfile to the latest available version that satisfies the requirements in the cpanfile. latest available + satisfies the requirements β both of those have to be true, okay? no shortcuts.
π EXAMPLE π
ok so picture this. you've got a cpanfile that looks like:
requires 'DBI', '1.600';
requires 'Plack', '== 1.0011';
and then you run carton install and you get DBI 1.610 (which was the latest at that time, slay) and Plack 1.0011 (exactly what the requirement said, because that requirement is strict).
a few weeks go by. DBI and Plack have been updated a couple of times since. you run carton install again andβ¦ nothing changes. π why? because the installed versions already satisfy the requirements in cpanfile. she said "we're good here."
now run carton update and it's a different story:
DBIgets updated to the latest version, say1.611β because that version still satisfies the requirement. β¨ ate that.Plackdoes NOT get updated. and that's correct, bestie. whatever the latest version on CPAN is, it won't satisfy Plack's requirement== 1.0011, because that requirement wants an exact version. exact means exact. no wiggle room. π
so yeah β carton update knows the difference between "sure, upgrade me" and "girl, absolutely not." that's the whole point. iykyk. π¦
fr fr the takeaway:carton updateis your bestie who respects your constraints. she'll pull the newest thing that still fits, and she will never break your==pins. π
and that's a wrap, babes π this page came to you from perl v5.34.0, dated 2022-05-12, filed under Carton...:Update(3pm) β go forth and update responsibly β¨π
π
π¦ where this page comes from
- debian bookworm: carton 1.0.35-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: carton 1.0.35-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: carton 1.0.35-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms