This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13414bd
)
If /dev/null is not readable, perl -e fails with
author
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Thu, 13 Oct 2005 15:53:39 +0000
(15:53 +0000)
committer
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Thu, 13 Oct 2005 15:53:39 +0000
(15:53 +0000)
an obscure error message. Make it more understandable.
p4raw-id: //depot/perl@25753
perl.c
patch
|
blob
|
blame
|
history
diff --git
a/perl.c
b/perl.c
index
a1667c8
..
42f32fe
100644
(file)
--- a/
perl.c
+++ b/
perl.c
@@
-3607,8
+3607,11
@@
S_open_script(pTHX_ const char *scriptname, bool dosearch, SV *sv)
#endif /* IAMSUID */
if (!PL_rsfp) {
/* PSz 16 Sep 03 Keep neat error message */
- Perl_croak(aTHX_ "Can't open perl script \"%s\": %s\n",
- CopFILE(PL_curcop), Strerror(errno));
+ if (PL_e_script)
+ Perl_croak(aTHX_ "Can't open "BIT_BUCKET": %s\n", Strerror(errno));
+ else
+ Perl_croak(aTHX_ "Can't open perl script \"%s\": %s\n",
+ CopFILE(PL_curcop), Strerror(errno));
}
}