Subject: | Croak statement in new_from_string() |
Submitting a possible patch modifying the syntax error block in new_from_string() to croak
with a string rather than printing to STDOUT. This avoids STDOUT interference in
environments such as mod_perl or CGI::Application where STDOUT is sent to a client. This
also allows fatal errors to be trapped and handled by the user of Math::MatrixReal.
Environment:
Module
Math::MatrixReal v2.05
Perl
v5.12.0 built for darwin-2level
Regards,
Shawn Page
bspage@webassign.net
Subject: | MatrixReal.patch |
211,212c211,214
< print "Math::MatrixReal::new_from_string(): syntax error in input string";
< print "String is\n$string\n---\n"; croak; }
---
> chomp $string;
> my $error_msg = "Math::MatrixReal::new_from_string(): syntax error in input string: $string";
> croak $error_msg;
> }