When a district attorney is unable to perform his duties for any cause, other than recusation, death, or resignation or removal from office, an assistant district attorney shall act in his place. When the district attorney still holds office and there is no assistant district attorney, the trial judge shall appoint an attorney at law of that district, having the qualifications of a district attorney, to act in his place during his disability or absence. If the trial judge is unable to make the appointment, he shall certify the fact in writing to the attorney general, who shall appoint a district attorney of another district to act in place of the regular district attorney. The temporary district attorney shall have all powers of the district attorney during the time of his disability or absence.