TITLE: How to compute homotopy classes of maps on the 2-torus?
QUESTION [12 upvotes]: Let $\mathbb T^2$ be the 2-Torus and let $X$ be a topological space.
Is there any way of computing $[\mathbb T^2,X]$, the set of homotopy class of continuous maps $\mathbb T^2\to X$ if I know, for instance, the homotopy groups of $X$?
Actually, I am interested in the case $X=\mathbb{CP^\infty}$. I would like to classify $\mathbb T^1$-principal bundles over $\mathbb T^2$ (in fact $\mathbb T^2$-principal bundles, but this follows easily.)

REPLY [7 votes]: This is a good chance to advertise the paper
Ellis, G.J. Homotopy classification the J. H. C. Whitehead way. Exposition. Math. 6(2) (1988) 97-110.
Graham Ellis is referring to Whitehead's paper "Combinatorial Homotopy II", not so well read as "Combinatorial Homotopy I". 
He writes:" Almost 40 years ago J.H.C. Whitehead showed in
\cite{W49:CHII} that, for connected $CW$-complexes $X, Y$ with dim
$X \le n$ and $\pi_i Y = 0$ for $2\le i \le \ n - 1$, the homotopy
classification of maps $X \to Y$ can be reduced to a purely
algebraic problem of classifying, up to an appropriate notion of
homotopy, the $\pi_1$-equivariant chain homomorphisms $C_* \widetilde{X}
\to C_* \widetilde{Y}$ between the cellular chain complexes of the
universal  covers. The classification of homotopy equivalences $Y
\simeq Y$ can similarly be reduced to a purely algebraic problem.
Moreover, the algebra of the cellular chains of the universal
covers closely reflects the topology, and provides pleasant and
interesting exercises.
"These results ought to be a standard piece of elementary algebraic
topology. Yet, perhaps because of the somewhat esoteric exposition
given in \cite{W49:CHII}, and perhaps because of a lack of worked
examples, they have remained largely ignored. The purpose of the
present paper is to rectify this situation."