  We introduce a method that generates invariant functions from perturbative
classical field theories depending on external parameters. Applying our methods
to several field theories such as abelian BF, Chern-Simons and 2-dimensional
Yang-Mills theory, we obtain, respectively, the linking number for embedded
submanifolds in compact varieties, the Gauss' and the second Milnor's invariant
for links in S^3, and invariants under area-preserving diffeomorphisms for
configurations of immersed planar curves.
