Which literary devices are used in the following excerpt from act 5 scene 1 of William Shakespeare's Hamlet?
Imperious Caesar, dead and turn’d to clay,
Might stop a hole to keep the wind away
O that that earth which kept the world in awe
Should patch a wall to expel the winter’s flaw.
There are quite a few literary devices found within the excerpt taken from William Shakespeare's Hamlet. Within the five lines in question, one can identify personification, alliteration, and metaphor.
Personification is the giving of human characteristics to non-human and non-living things. In the lines in question, personification is found in the earth keeping the world in awe and winter's possession of a flaw. In reality, the earth does not possess the capability keep one in awe, and the winter cannot possess a flaw. Only humans can really possess a flaw (given they are the ones to define what a flaw is).
Alliteration is the repetition of a consonant sound within a line of poetry. In the lines in question, the "w" sound in "which" and "world" is repeated. Also, the "w" sound also repeats in "wind" and "away."
Metaphor is the comparison which one would not normally expect between two unlike things. In regards to the lines in question, Caesar is compared to something which could plug a hole or patch a wall. The first line openly makes this comparison.