Magpie attack narrowly misses man's eye