[TS-3254] : patch from James to fix perl get_stats API