A lot has happened in the 7+ years since that was written. So, while it still is possible to use the hackish perl script, I recommend using libqmi/qmicli instead.
The get/set-usb-composition commands do exactly the same as the perl script:
bjorn@miraculix:~$ qmicli --help-dms|grep swi
--dms-swi-get-current-firmware Get Current Firmware (Sierra Wireless specific)
--dms-swi-get-usb-composition Get current and supported USB compositions (Sierra Wireless specific)
--dms-swi-set-usb-composition=[#] Set USB composition (Sierra Wireless specific)
qmicli can also be used in MBIM mode.
I assume libqmi is packaged for Arch Linux as well. In Debian, the package with qmicli is named libqmi-utils. It’s probably something similar in other Linux distros.