After admiring the glazed pig turning on the spit at the "Defend Freedom" pork roast, Rick Perry was striding toward the stage when a master carver in an apron chased after him.

"I'm a Perry guy now," Ed Naile of Deerfield quickly told Perry's New Hampshire advisor before returning to his post at the spit. "Ever since that indictment thing."

A week after he was indicted by a Texas grand jury, rallied GOP voters to his defense, and celebrated his booking by going for an ice cream cone, the Texas governor made his first foray to New Hampshire to test its voters' willingness to give him a second chance in 2016.

When he ran for president in 2012, Granite State voters were not impressed by Perry's confident swagger or his campaign trail antics.

He did not endear himself to voters with his assertion that Republicans who didn't support in-state tuition for the children of illegal immigrants didn't "have a heart," or the odd New Hampshire speech when he hugged a bottle of maple syrup, or that infamous moment during a Republican primary debate when he could not name the third federal agency that he would cut. ("Oops.")

This weekend, Perry was looking to turn the page on all that. Ironically, his recent legal troubles, which he has described as a politically motivated sham, seem to have heightened people's interest in his potential candidacy. At each stop, staffers with his new political action committee, RickPAC, handed out free T-shirts bearing his now-famous mug shot. Some voters immediately put them on.

Perry was jovial and warm in his one-on-one interactions with voters, and seemed keen to show the crowds that he is a different kind of (potential) candidate this time. During his first stop at a business luncheon in Portsmouth — where he seemed almost stiff in his tie and suit — he told reporters he wasn't "physically or mentally" on top of his game in 2012.

"I learned some really, really good, humbling and frustrating lessons running for the presidency. One is that if you're going to do this, you shouldn't have major back surgery six weeks before you announce," Perry said. He added that he hadn't done the kind of spade work required of prospective presidential candidates here.

"You have to spend a lot of time in these states if you're going to do it," he said in Portsmouth. "Generally there's a courtship that goes on. There's a period of time that you need to spend with people. They need to know you. You need to know them. And I didn't do that."

With six events in a little more than 24 hours, Perry aimed to impress on voters that he had learned his lesson. He reeled off statistics about New Hampshire's tax code, chatted with voters about his tutorials at the Stanford-based Hoover Institution, and sat attentively through a lengthy Americans for Prosperity presentation on the state's economic challenges before giving his own talk.

He was prompt and in no rush to leave his events as he was questioned by voters about illegal immigration, the advance of Islamic State militants in Syria and Iraq, and the police response to the unrest in Ferguson, Mo.: "You can't just go run up and down the streets and create mayhem," Perry said of Ferguson. "The other side of that is you don't crush a fly with a sledgehammer."

Perry was repeatedly asked about his recent indictment on charges of abuse of power, which stemmed from his threat to veto $7.5 million in funding for a state anti-corruption unit housed in the office of Democratic Travis County Dist. Atty. Rosemary Lehmberg.

Perry threatened to veto the money unless Lehmberg stepped down after she was arrested last year on drunk driving charges in an ugly, videotaped confrontation with police. She refused to, and Perry followed through on his veto threat, leading a government watchdog group to file a complaint against him alleging improper intimidation.

During his New Hampshire visit, Perry cast the indictment as a form of political persecution.

"I refer to Travis County as the blueberry in the tomato soup," he told one audience, before repeating his stock line on the legal battle: "I'm going to fight this with every fiber of my being."

Perry spoke at far greater length about the threat of Islamic State militants and illegal immigration at the U.S.-Mexico border, accusing President Obama of being too timid in his response to both crises.

Perry knitted the two topics together by asserting that Islamic State terrorists may have already entered the United States via its "porous" southern border. Pentagon officials said this week that there was no evidence for that, but Perry repeatedly said it was a possibility.

Speaking near the family home of New Hampshire native James Foley, the U.S. photojournalist who was beheaded by the Islamic State on video, Perry said Foley was the personification of courage who had shown the world the evil of the militant group, formerly known as the Islamic State in Iraq and Syria, or ISIS.

"They're not going to stop until they reach our shores and kill as many Americans as possible," Perry said. "The issue before us is on what terms we will confront this threat. We can deal with it now using American air power, American special forces to help [Kurdish] peshmerga forces and Iraqi forces annihilate this threat. Or we can wait until the cancer of ISIS metastasizes, grows stronger, and the only option we have left is to send ground forces to fight a fourth war in the Middle East."

He then mocked Congress for going on a five-week vacation when the nation's immigration system "is broken."

"I'm not waiting on Washington," Perry said, drawing applause and whistles of approval from the crowd as he noted that he had sent National Guard troops to the border. "If Washington will not take action to secure the border, Texas will."

Perry's effort to project strength and resolve on a range of issues went over well with Republican voters who were skeptical of him during the last election cycle.

Kathy Holmes of Chichester said she voted for Herman Cain over Perry that time because she thought "that swashbuckler voice was probably too much." But, she added, "he's a man of action now."

As she waited in line for roast pork and baked beans in Rochester after hearing Perry speak, Holmes was already imagining Perry's mug shot making a "great campaign button," especially if printed with a slogan like "Do what's right."

"Do what's right, and then get an ice cream cone," her friend Debi Meyers suggested.

maeve.reston@latimes.com

Twitter: @MaeveReston