That passage has nothing to do with corporeal punishment.
Has a lot to do with discipling your offspring.