Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Carp-Always-Color CPAN distribution.

Report information
The Basics
Id: 73394
Status: rejected
Priority: 0/
Queue: Carp-Always-Color

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.05
Fixed in: (no value)



Subject: mst says you're doing it wrong
14:35 < ether> bah, Carp::Always::Color mangles $@, so various modules that check $@ and ignore it if it matches a specific pattern are now broken 14:35 < ether> e.g. PPI that checks for PPI::XS 14:38 <@mst> well fix it, dear ether :) 14:47 < ether> I'm not sure what the best fix is, other than changing the regex to remove the ^ anchor 14:48 < ether> and, it looks like PPI's repo is under subversion, so f that@! 14:48 <@mst> I meant ... oh, I see 14:48 < ether> lol 14:48 <@mst> yeah. this is why LeoNerd wrote String::Tagged 14:49 <@mst> because you can't just frigging embed colour codes in strings
Show quoted text
> 14:48 <@mst> yeah. this is why LeoNerd wrote String::Tagged > 14:49 <@mst> because you can't just frigging embed colour codes in strings
Also, a String::Tagged will yield the plain untagged string in string context, such that e.g. regexp matches remain working. Colour formatting can be obtained by subclassing similar to the String::Tagged::HTML, perhaps to write a my $str = String::Tagged::ANSI->new("plain text"); # apply some tags print $str->as_ansi; -- Paul Evans
There is no way to do what this ticket seems to want - the context used when warnings and exceptions get printed to the screen is just normal stringification context, the same thing that would be used in regex matches. I don't see how String::Tagged would make any difference here.