When the time comes to make a movie about Edward J. Snowden, the former National Security Agency contractor who disclosed the agency's vast global and domestic surveillance (and you know that will happen some day soon), think of Barrett Foa.

After all, both men are in their 30s, blond and. preppy. For the past four years Foa has played another mysterious computer infiltrator, high-tech operator Eric Beale in the highly rated CBS-TV series "NCIS: Los Angeles."

Executive producer Shane Brennan's crime drama series, which also stars Chris O'Donnell, LL Cool L and Linda Hunt, centers on an undercover team that is empowered by Foa's computer know-how. He's the kind of nerdy techie hacker who knows more about you than you could ever imagine.

This summer Foa is taking on a dramatically different part in Nutmeg Summer Series production of "The Music Man" at the Harriet S. Jorgensen Theatre on the UConn campus at Storrs.

Foa will be playing Harold Hill, a more charismatic kind of stealth mover and shaker, in the Tony Award-winning Meredith Willson musical about the fast-talking, charismatic school band hustler who takes sells band instruments and uniforms to the residents of River City, Iowa.

"I remember telling Chris O'Donnell that I was doing 'The Music Man' and he told me I was crazy for doing all that rehearsal for just 12 performances," says Foa on the first day of rehearsals for the Connecticut Repertory Theatre production. "I said, 'I can't think of anything I want to do more."

The show has one preview performance on Thursday, July 11. It opens Friday, July 12, and continues through July 21. Then Foa turns around and immediately stars filming the new season of the TV series.

Foa grew up in Manhattan, attending the private college prep Dalton School on the Upper East Side. (The Internet detail about him being accepted to the school because he solved a puzzle in record time is bogus, he says.) For four summers he attended the famed Interlochen Arts Camp in upstate Michigan, which inspired him to pursue theater arts in college.

Foa has some familiarity with "The Music Man. " He was a chorus boy in several productions at the University of Michigan at Ann Arbor, where he studied theater, and at regional theaters after he left school.

He especially remembers the college production which starred fellow classmates Gavin Creel ("Hair" on Broadway) in the starring role and David Burtka ("The Opposite of Sex" on Broadway) as Tommy Dijilas.

"Gavin was like a whopping 20 when he played it and he was fantastic. I looked at a video of that show recently and it still holds up. I would totally watch him do it on Broadway."

For Connecticut Rep's "The Music Man," which is directed and choreographed by Cassie Abate, Foa plays opposite college pal, Courtney Balan, who plays Marian the Librarian. (Foa suggested casting her, since they had played togehter in college in "Anything Goes" and "Candide.")

Foa say he was unfocused when he left college and his immediate goal was simply to be a working actor.

"Suddenly I got cast as Jesus in a [2000 off-Broadway] revival of 'Godspell' and that kind of put me on the map early on."

Then came succession of "male ingenue" roles, such as Matt in "The Fantasticks," Frederic in "The Pirates of Penzance" and Claudio in "Much Ado About Nothing" (at Hartford Stage), and on Broadway in "Mamma Mia!", "Avenue Q" and "The 25th Annual Putnam Country Spelling Bee."

"For a while it was if I could only play those roles, like Rolf in 'The Sound of Music' or Hero in 'A Funny Thing Happened On the Way to the Forum.' But I'm past those roles now."

In "The Music Man," Foa steps out as leading man, leaving the supporting player parts behind.

Looking For A Stage

Foa, 35, says he was searching for a musical project for the late spring or early summer during the hiatus of "NCIS: Los Angeles" when a casting agent suggested CRT who was looking for a "younger Harold Hill." (FYI, Robert Preston was only 39 when he originated the part on Broadway in 1957.)

"You have to make the choice to turn the page," he says of some of his career choices. "And now it feels like it's the time to carry a show. It feels like before this I was in arrested development where I was cast as a certain type — and even you think of yourself as that type — even as you're growing older.

"Now I can think in terms of romantic leading man roles that have a character aspect to them, too — like Georg in 'She Loves Me' or Billy Crocker in 'Anything Goes' or the Stark Sands role [lead character Charlie Price] in 'Kinky Boots.'"

Foa was always open to taking the next step, whether it was trying his hand at non-musical roles — he starred in the world premiere of Adam Bock's play "The Drunken City" at Playwrights Horizons — or co-producing,co-writing and performing in the musical concert-event "For the Record: John Hughes," a tribute to the late director-producer of "The Breakfast Club," "Pretty in Pink" and "Sixteen Candles.

During a lull in gigs in the fall of 2008, Foa decided to go to Los Angeles. "I went with zero expectations," he says. "If someone asked me if I was looking to be in comedies or drama, my answer would be: 'I don't know. I haven't thought about it. I guess I'd be in comedy because of my theater background.' "

Foa returned to his Broadway roots for a night as the backstage host for last month's televised Tony Awards, chatting up the winners and presenters as they stepped off stage. (It was a natural CBS tie-in for the actor.)

The recent news swirling around Snowden's leaking of high security information strikes a chord that's close to home — or at least close to his "NCIS" character's home.

"People ask me if I'm a techie," he says. "Sure, I'm an intelligent kid and I went to a nice school, but I don't hack into government agencies on a regular basis. I have an iPhone and an iPad but i don't know if that makes me a total techie."

But that raises an interesting question, Foa asks rhetorically. "Is Eric Beale a mole? I think there is something that could arise."

And connections between Beale and Snowden?

"Oh, there's something that gains entry through charm, through intelligence, wit, skills, passion and on occasion..."

Technology?

"Hmmm. I'm seeing the resemblance more and more between [Snowden] and Eric: this nerd kid is the most powerful guy in the world. I love it. He sings, he dances, he taps..."

Into government agencies?

"I was going to say people's hearts — or in my case now, he taps into the citizens of River City's wallets."

THE MUSIC MAN plays July 11-21 at the Harriet S. Jorgensen Theatre, 802 Bolton Road,on the UConn campus in Storrs. Shows are Tuesdays through Thursdays 7:30 p.m.; Fridays at 8 p.m.; Saturdays at 2 and 8 p.m.; Sundays at 2 p.m. Tickets are $42 to $45. Information: 860-486-2113 and www.crt.uconn.edu.