Skip Menu |
 

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

Report information
The Basics
Id: 96561
Status: resolved
Priority: 0/
Queue: Carp-Always

People
Owner: Nobody in particular
Requestors: Robert.Rothenberg [...] foxtons.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.16



Subject: Regex is too greedy
Date: Thu, 19 Jun 2014 13:39:27 +0000
To: "bug-Carp-Always [...] rt.cpan.org" <bug-Carp-Always [...] rt.cpan.org>
From: Robert Rothenberg <Robert.Rothenberg [...] foxtons.co.uk>
Download (untitled) / with headers
text/plain 1.1k
The regular expression $arg =~ s/(.*)( at .*? line .*?\n$)/$1/s; is too greedy. If you have an error like Kaboom at foo/bar.pl line 123 Some additional diagnostics added here by a custom error handler. then the additional diagnostics added will be lost. Try changing the regex to $arg =~ s/(.*)( at .*? line \d+\n$)/$1/s; Privacy and Confidentiality Notice: This is strictly confidential and intended solely for the person or organisation to whom it is addressed. It may contain privileged and confidential information and if you are not an intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this message in error, please notify us as soon as possible and delete it and any attached files from your system. The views and opinions expressed in this email message are the author's own and may not reflect the views and opinions of the author's employer. Foxtons Limited is registered in England and Wales (registered number 01680058). Our registered office is at Building One, Chiswick Park, 566 Chiswick High Road, London, W4 5BE. Show quoted text
________________________________ This e-mail has been scanned for viruses by MessageLabs.
Download (untitled) / with headers
text/plain 280b
Fixed in release 0.16 – https://metacpan.org/release/FERREIRA/Carp-Always-0.16 The regex use was revamped, acting after Carp::longmess() and tuned to suppress the duplicate tracebacks (if any). So the use case you described should be now safe, and has turned into a test case.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.