Bored to Death (2009)

A well-meaning but struggling writer decides to lead a sort of double life by pretending to be a private detective using the methods he read about in old detective novels.