Heavy-quark fragmentation: perturbative resummation with the analytic coupling model