LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

perldiag

perl documentation file containing all diagnostic messages that Perl can produce

TLDR

View all Perl diagnostics
$ perldoc perldiag
copy
Search for specific message
$ perldoc perldiag | grep "[error message]"
copy
Use splain for explanations
$ perl [script.pl] 2>&1 | splain
copy
Enable verbose warnings
$ perl -Mdiagnostics [script.pl]
copy

SYNOPSIS

perldoc perldiagsplain [errormessage_]

DESCRIPTION

perldiag is a Perl documentation file containing all diagnostic messages that Perl can produce. Each message includes explanation and suggested fixes.Access via perldoc or use diagnostics module for runtime explanations.

Read full diagnostics

perldoc perldiag

Use diagnostics module in script

perl -Mdiagnostics script.pl

Explain error messages

echo "Use of uninitialized value" | splain

$
# IN SCRIPT
copy
use diagnostics; # Verbose messagesuse warnings; # Enable warnings

Or for specific categories

use warnings qw(all);no warnings qw(uninitialized);

$
# MESSAGE TYPES
copy
(W) Warning - may indicate problem(D) Deprecation - feature being removed(S) Severe warning - almost certainly wrong(F) Fatal - compilation error(X) Alien - error from external source
$
# CAVEATS

Part of core Perl documentation. diagnostics module adds runtime overhead. Use only during development.

# HISTORY

perldiag is part of **Perl** core documentation by **Larry Wall** and the Perl community.

# SEE ALSO

perl(1), perlre(1), perldoc(1)
copy

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid