Chiral Anomalies via classical and quantum functional methods