If $\int_{\gamma}f=0$ for any closed curve $\gamma$ in the punctured disk, then $f$ has an analytic extension to $B(a,R)$?

I'm reading Conway's complex analysis book and on page 103 he said:

Doubts

1. Is it true the converse? If $\int_{\gamma}f=0$ for any closed curve $\gamma$ in the punctured disk, then $f$ has an analytic extension to $B(a,R)$?

2. What the fact $\lim_{z\to a}$ exists has to do with everything?

1. The converse is not true. Take for example $f(z) = \dfrac{1}{(z-a)^2}$ (or any other function admitting an antiderivative on the punctured disc).
• Maybe it's woth mentioning that the integral is just picking out the residue. So you just had to find a meromorphic function with zero residue. This also tells you how to fix the claim. One would need that $\displaystyle \int (z-a)^k f(z)\, dz=0$ for all $k\geqslant 0$. (this is for OP) Nov 23, 2016 at 12:40