I discussed this with several people at YAPC last year -- I think I even talked to Larry about it. You can't localize a function, and undefing it leaves a broken stub. There were several approaches I could think of: