I checked it out on my book and luckily found this. <br>"Perfect form is required when the action The Infinitive expresses precedes the situation The Predicate conveys." <br> <i>Source:张道真,2002(2007.3 reprint),张道真实用英语语法,外教版,on page:301</i> One example it provides on the same page <br> <b> "He was pleased to have made your acquaintance."</b> So I think your first expression fit the context well.