Katy Perry was taught to ‘pray the gay away’