While handling it it adopted all the postures this caterpillar is known for, suggesting either an elephant, when the caterpillar is fully extended, or a snake, when the caterpillar is disturbed and it raises its front, while retracting its head.
A 'snake' resemblance is a recurrent theme in various large caterpillars from several families, and it has been suggested that this way the caterpillars gain protention from birds, wary of snakes, which are startled when the caterpillar moves its head and the eyes are exposed on the thickened anterior end.
A Canadian team formed by Thomas Hossie and Thomas Sherrat carried out an interesting set of experiments using pastry caterpillars, which they exposed to natural predation by placing them in branches in the wild. They used pastry caterpillars coloured with food dye with or without eyespots with or without defensive posture ('snake') and with or without countershading.Their results suggested that the presence of eyespots and the raised position might deter birds from eating the caterpillars and countershading and the position of the eyespots in the thickened anterior end has a protective effect too. But don't rely on me telling you, as you can read it from Hossie's himself in his blog Caterpillar Eyespots.
A close up of the eyespots.
The 'elephant' pose.
and the 'snake' pose
another angle of the snake pose
And of the elephant pose.
The happy caterpillar munching away on its new home.