Parse:...rorItem(3pm)
π NAME π
Parse::ErrorString::Perl::ErrorItem β it's literally a Perl error item object, bestie. You're in the Parse:...rorItem(3pm) manual page, and yes, that name is giving cryptic but we move. π
β¨ DESCRIPTION β¨
okay so picture this: every one of these objects is a little backpack stuffed with accessors, and each accessor is one fact about one error. π
real talk though β onlymessage,file, andlineare guaranteed to be present for every error. The rest of these? They show up when they feel like it. So vibe-check before you use them, no cap.
typeβ normally hands you a single letter telling you what kind of error this is. The possible options are"W","D","S","F","P","X", and"A". Sometimes an error can be of either of two types, and in that case you get a string like"S|F"back in scalar context, and a list of the two letters in list context. Iftypeis empty, you can assume the error was not emitted by perl itself, but by the user or by a third-party module. πtype_descriptionβ a description of the error type. The possible options are:
W => warning
D => deprecation
S => severe warning
F => fatal error
P => internal error
X => very fatal error
A => alien error message
If the error can be of either of two types, the two types are concatenated with " or ". And heads up: this description is always returned in English, regardless of the lang option. periodt. π
messageβ the error message. Just the message. The moment itself. π¬fileβ the path to the file where the error happened, possibly truncated. If the error occurred in a script, the parser will attempt to return only the filename; if the error occurred in a module, the parser will attempt to return the path to the module relative to the directory in@INCin which it resides. Fancy, right? πΈfile_abspathβ absolute path to the file in which the error occurred. No truncation, no games. πfile_msgpathβ the file path as displayed in which the error message. π«Άlineβ line in which the error occurred. Simple. Iconic. βnearβ text near which the error occurred. Note that this often contains newline characters, so don't be surprised when it comes at you multiline. πatβ additional information about where the error occurred (e.g."at EOF"). πdiagnosticsβ a detailed explanation of the error (fromperldiag). If thelangoption is specified when constructing the parser, an attempt will be made to return the diagnostics message in the appropriate language. And if an explanation is not found in the localizedperldiag, the defaultperldiagwill also be searched. It's returned as raw pod, so you may need to use a pod parser to render it into the format you actually need. Not me getting raw pod and needing a whole other tool to read it πstackβ the callstack for the error. Returns a list ofParse::ErrorString::Perl::StackItemobjects. The whole ancestry, the whole family tree, we love a paper trail. π
π the legal corner (copyright + license) π
# Copyright 2008-2013 The Padre development team as listed in Padre.pm.
# LICENSE
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl 5 itself.
So yeah β copyright 2008-2013 belongs to the Padre development team as listed in Padre.pm, and the license says this program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself. π«‘
and that's the whole page, bestie π¦ this doc came to you courtesy of the User Contributed Perl Documentation, version perl v5.36.0, dated 2022-12-06 β go forth and parse those errors like the main character you are πβ¨
π¦ where this page comes from
- debian bookworm: libparse-errorstring-perl-perl 0.27-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libparse-errorstring-perl-perl 0.27-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libparse-errorstring-perl-perl 0.27-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libparse-errorstring-perl-perl 0.27-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libparse-errorstring-perl-perl 0.27-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms