I needn’t have worried. The prospect of a feature-length “Mr. Peabody & Sherman” made me nervous, since the Sahara-dry humor that made the old Jay Ward cartoon unique is all but absent from today’s animated efforts.

The story of the ultra-smart, time-traveling dog and his pet boy was introduced as a segment of Ward’s brilliant “Rocky & Bullwinkle Show” in the 1960s.

And the attempt to turn that show into a live-action movie (co-starring Robert De Niro, no less) was a catastrophe. Ditto the live-action reboots of Ward’s “Dudley Do-Right” and “George of the Jungle.”

What a relief to see that while “Mr. Peabody’s” visuals are enhanced to sleek 21st century standards, the essential charm of the series survives more or less intact.

In this telling, sophisticated, sarcastic Peabody, an outcast brainiac in his youth, adopts human foundling Sherman to give him the family he never had as a pup.

A Nobel Prize winner, inventor, business tycoon and all-around whiz, Peabody finds his greatest challenge in raising a child.

When Sherman and bratty schoolmate Penny take the WABAC Machine for a joyride, they create a rift in the space-time continuum.

Peabody takes command as they zip from the French Revolution to ancient Egypt, Renaissance Florence and the Trojan War to repair the damage. There’s a romantic triangle involving the children and Egypt’s boy king Tutankhamen, a zoom in Leonardo’s flying machine, and some finger-painting with Vincent Van Gogh before time is put back in joint.

These mini-adventures recreate the format of the old cartoons, dropping into a bygone epoch to learn a thing or two amid a barrage of sight gags and groan-worthy puns.

Some of the archaic jokes are absolute crack-ups.

The choice of the actor who voices Albert Einstein is a hoot in itself.

There’s a highbrow opera joke so offhand they tell it twice.

And you have to love a movie with an ancient Hebrew Egyptian kvetching, “Oy, again with the plagues. Why did I ever move here?”

Sherman himself offers a blank-faced “I don’t get it” after some of Peabody’s abstruse witticisms.

But there’s enough butt-related humor to keep the grade-schoolers in stitches.

In the TV show, the beagle kept the boy as a pet. That relationship has been revised to introduce a bit of sentimentality.

Those with a nose for subtext will also find a thread of innuendo in the notion of prissy confirmed bachelor Peabody winning the court’s approval of his unconventional custody arrangement, and the efforts of the bigoted social worker trying to take Sherman away.

Ultimately, Peabody’s grandest adventure isn’t rescuing Earth from a time-wormhole but easing back on his fatherly perfectionism and letting Sherman find his own way.

When the hyper-intelligent dog finally relaxes and wags his tail, you’ll want to tell the filmmakers, “Good boy!”