Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Can I get cpanm to skip re-installation of a module when pointing directly to a remote .tgz file?

by Fletch (Bishop)
on Oct 01, 2021 at 20:16 UTC ( [id://11137178]=note: print w/replies, xml ) Need Help??


in reply to Can I get cpanm to skip re-installation of a module when pointing directly to a remote .tgz file?

Kludgy (marginally), but maybe further patch your Tk.pm and define something like $Tk::IS_FIXED_BOLEARY = 1 in it. Then you could prefix your call to cpanm with something like (adjusting for shell and how snippets need to be called in whatever you're doing):

perl -MTk -E 'exit( $Tk::IS_FIXED_BOLEARY == 1 ? 0 : 99 )' 2>&1 > /dev +/null if [[ $? -eq 0 ]] ; then echo "Locally patched Tk already present, skipping" else echo "Locally patched Tk NOT present, installing with cpanm" cpanm https://BLAHBLAHBLAH/YACKETYSMACKETY fi

Edit: Tweaked exit value check and tossed output. Derp.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: Can I get cpanm to skip re-installation of a module when pointing directly to a remote .tgz file?
by boleary (Scribe) on Sep 23, 2022 at 11:13 UTC

    I hadn't checked back on the history of this post in quite some time..

    I like this workaround, and I was actually doing something similar with my installation script.

Re^2: Can I get cpanm to skip re-installation of a module when pointing directly to a remote .tgz file?
by boleary (Scribe) on Oct 03, 2021 at 11:51 UTC

    Not a bad idea...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-28 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found