We noticed a familiar face during the preview screening of the movie “Ruby Sparks” at the Loews Boston Common on Monday. Local author Tom Perrotta — of “Little Children,” “Election,” and “The Leftovers” — has a cameo in the film, which was directed by Jonathan Dayton and Valerie Faris of “Little Miss Sunshine” fame. Dayton and Faris were once attached to direct a film version of Perrotta’s “The Abstinence Teacher,” but that project is now in the hands of Lisa Cholodenko , who made “The Kids Are All Right.” “Ruby Sparks” is about an author (played by Paul Dano , also of “Little Miss Sunshine”) who creates the perfect girlfriend (played by Zoe Kazan ) just by writing about her. Perrotta, who appears as himself, is featured in an early scene that takes place at a literary event. In real life, Perrotta will be at Newtonville Books — which is now in Newton Center — on Tuesday night to talk about the paperback edition of “The Leftovers,” which he’s adapting for HBO. For the record, he has been on the big screen before. He had a cameo in the 2006 adaptation of “Little Children.”
