I'm trying to build a quick auto-updater in Perl Windows. I've noticed that when I call cpanp
to install the update of the package it fails to install a new version of the script because the script is currently running. I'm calling cpanp
with CORE::system()
currently. If I called cpanp
with exec()
would that release the executable for replacement? Or, does Windows keep it tied up even though execution has been turned over entirely to cpanp
?
Currently, my process flow looks something like this,
$VERSION
cpanp
to run update with URL.Would system()
behave differently than exec()
on Win32 with regard to replacement of the executable? On Linux it works as designed.
I just tested it. exec
works as it should on both Linux and Win32. See this page for portability info on Perl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With