G
Gunnar Hjalmarsson
I have made a weird observation when using CGI::Carp, version 1.26.
This code:
use CGI::Carp 'fatalsToBrowser';
open FH, 'nonexistingfile' or die $!;
results in the message " at ...test.pl line 10." being sent to STDERR,
i.e. the error string is not printed.
If I change the code to:
use CGI::Carp 'fatalsToBrowser';
open FH, 'nonexistingfile' or die "$!";
--------------------------------------^--^
the resulting error message instead reads "No such file or directory
at ...test.pl line 10.", i.e. as expected.
(Version 1.20 of CGI::Carp behaves as expected whether the $! variable
is quoted or not.)
Is the above a bug or a feature in CGI::Carp?
This code:
use CGI::Carp 'fatalsToBrowser';
open FH, 'nonexistingfile' or die $!;
results in the message " at ...test.pl line 10." being sent to STDERR,
i.e. the error string is not printed.
If I change the code to:
use CGI::Carp 'fatalsToBrowser';
open FH, 'nonexistingfile' or die "$!";
--------------------------------------^--^
the resulting error message instead reads "No such file or directory
at ...test.pl line 10.", i.e. as expected.
(Version 1.20 of CGI::Carp behaves as expected whether the $! variable
is quoted or not.)
Is the above a bug or a feature in CGI::Carp?