* Eric Blake wrote on Mon, Sep 20, 2010 at 11:10:14PM CEST: > On 09/20/2010 02:59 PM, Ralf Wildenhues wrote: > >>Since my perl is weak, are there any > >>suggestions on more robust ways to express this action? > > > >Searching for newlines in the first regex? You want it to be partial > >exactly if you print more lines. > > It would be easier if I could print an empty warning as the > non-partial line, as in (pseudo-code): > msg $cat, $loc, "warning: "msg", partial => 1; > for (split /\n/, $stacktrace) > { > msg $cat, $loc, $trace, partial => 1; > } > msg $cat, ":0", ""; > > rather than having to determine on the fly whether $stacktrace is > non-empty, and if so, which $trace of $stacktrace is the last line. > Is that something that Channels.pm already supports, or which could > be added easily?
Looking at the code, it should be supported already. Untested though, and I think the location should be an empty string. Cheers, Ralf