On Tue, Oct 23, 2007 at 08:28:28AM +0200, Wincent Colaiuta wrote: > I did too, where you add a third, optional "trailer" parameter to the > function where you pass the newline if there is one (following the style of > the functions in color.c). Pasting it below. The problem with that approach is that you can only send in a single line at a time (with the newline detached!), so it makes life harder for the caller. E.g., there is at least one spot that uses a here-doc with many lines; splitting that into a bunch of print_ansi_color calls would be unnecessarily ugly. > Having said that, I think this kind of function belongs in Git.pm, and the Yes! Most of this is obviously library-ish code, and should go into the library. > dependency on Term::ANSIColor should be replaced with dependency-free code > that generates the colors itself; this should be easy because the number of Out of curiosity, are people really running perl < 5.6? Term::ANSIColor has been in the base distribution for 7 years now. -Peff - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html