there is another chapter where "Having done something" with the action as subject or direct object of a sentence using El Infinitivo Compuesto (= haber + participle)
How does it differ from using infinitive?
Fumar es malo para la salud
Haber fumado es malo para la salud
if I were to guess, I am guessing that using el infinitive compuesto is that, the action was indeed being carried out where as using infinitive is just a general statement. the person we are warning regarding smoking is bad, did not smoke.
Whereas if the person indeed smoke, we will say haber fumado es malo para la salud