Skip Menu |
 

This queue is for tickets about the Error CPAN distribution.

Report information
The Basics
Id: 6130
Status: resolved
Priority: 0/
Queue: Error

People
Owner: Nobody in particular
Requestors: Marek.Rouchal [...] gmx.net
Cc:
AdminCc:

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



Subject: some issues in Error
Download (untitled) / with headers
text/plain 929b
Hello, I have some suggestions to improve the Error package: In Error.pm, there is ... sub run_clauses ($$$\@) { my($clauses,$err,$wantarray,$result) = @_; my $code = undef; $err = new Error::Simple($err) unless ref($err); ... I think it would be nice if there was a possibility to configure an alternative Error-like class to be used for building objects if $@ is just text; Error::Simple->new is used in several places, perhapsit should be defined as a default in $Error::simple_class or the like. And further down, in Error::Simple, there is: @args = ( -file => $1, -line => $2) if($text =~ s/ at (\S+) line (\d+)(\.\n)?$//s); This is not sufficient, since the "die" message may contain the file handle and the line number. I think this should read: @args = ( -file => $1, -line => $2) if($text =~ s/\s+at\s+(\S+)\s+line\s+(\d+)(?:,\s*<[^>] *>\s+line\s+\d+|)\.?\n?$//s); Hope this helps, Marek


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.