Being 'old school' equipped, I have an air pump on my bike. I've wielded it more than once, even struck the occasional blow.
I once scored a direct hit on a shepherd's schnoz right next to a trailer that had a half dozen Harleys parked in front of it. I was listening for motorcycles the rest of the ride!
We also used to do a lot of riding in 'horse country', expensive rural neighborhoods with lots of gentleman farms and fields where folks did a fair bit of horseback riding. I came up on a dog in that area, reached for the pump and raised it in preparation. To my surprise the dog turned around and ran straight off. I concluded that the poor animal had encountered a few riding crops in the past.