Passing anonymous function as plug option

Thanks NobbZ, the __MODULE__ tip fixed the error! I didn’t realise that calling plug would create a module attribute. For anyone reading this thread in future, the docs on Module attributes actually have some info on this.