If you catch enough squid on your boat, no matter how careful you are you will get the odd direct hit.
I have tried the gently bringing the squid up to the boat and grabbing it around the neck (squeeze water out of the squid), but I am very aware of that parrot like beak and don't really enjoy the method.
If catching by rod, don't bring them in to quickly (keep squid under the water) - make sure you don't bring them in so that they are sitting on top of the water as when they ink - they will be squirting the ink straight at your boat.