...
EXP30:EX1: There are several instances when die()
and warn()
are preferred over carp()
and croak()
:
- Inside a signal handler . This is because the behavior of
croak()
andcarp()
functions when invoked inside a signal handler are not documented.
- Outside a subroutine, that is, when used in a small Perl script. In this case, all four functions have no stack trace to indicate their calling location.
...
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
EXP30-PL | InfoMedium | Probable | Low | P18P12 | L1 |
Automated Detection
Tool | Diagnostic |
---|---|
Perl::Critic
| ErrorHandling::RequireCarping |
InputOutput::ProhibitInteractiveTest | |
Miscellanea::ProhibitFormats |
Related Guidelines
...
...
...
...
...
Bibliography
[Conway 2005] | |
[CPAN] | Elliot Shank, Perl-Critic-1.116 RequireCarping, InteractiveTest, ProhibitFormats |
---|---|
[ |
...
CPAN] |
...
Chris Dolan, |
...
Max. parent
...