  We study the depinning phase transition of a directed polymer in a
$d$-dimensional space by a periodic potential localized on a straight line. We
give exact formulas in all dimensions for the critical pinning we need to
localize the polymer. We show that a bounded state can still arise even if, in
average, the potential layer is not attractive and for diverging values of the
potential on the repulsive sites. The phase transition is of second order.
