Config...::Error(3pm)
π NAME π
okay bestie, say hi to Config:Scoped::Error β it's an exception class hierarchy built on top of Error.pm, made specifically for Config::Scoped. that's the whole vibe. π
β¨ SYNOPSIS β¨
here's how you actually throw these bad boys π
use Config::Scoped::Error;
Config::Scoped::Error::Parse->throw(
-text => $parser_error,
-file => $config_file,
-line => $thisline,
);
Config::Scoped::Error::IO->throw(
-text => "can't open file: $!",
-file => $config_file,
-line => $thisline,
);
Config::Scoped::Error::Validate::Macro->throw(
-text => "macro redefinition: $macro_name",
-file => $config_file,
-line => $thisline,
);
like, you pick the class that matches your drama, and you throw with -text, -file and -line. that's it. periodt. π
πΈ DESCRIPTION πΈ
Config::Scoped::Error is a class hierarchy based on Error.pm. and the way it's structured? genuinely iconic. here's the full family tree, no cap:
Config::Scoped::Error
Config::Scoped::Error::Parse
Config::Scoped::Error::Validate
Config::Scoped::Error::Validate::Macro
Config::Scoped::Error::Validate::Parameter
Config::Scoped::Error::Validate::Declaration
Config::Scoped::Error::Validate::Permissions
Config::Scoped::Error::IO
every one of those is a real, defined exception class. main character energy all the way down. π
π¦ SEE ALSO π¦
Config::Scopedβ the whole reason this existsErrorβ the parent energy behind it all
iykyk. π
π AUTHOR π
Karl Gaissmaier <karl.gaissmaier at uni-ulm.de>
give them their flowers, fr fr. π·
π COPYRIGHT AND LICENSE π
Copyright (c) 2004-2008 by Karl Gaissmaier
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
like β free software, do your thing, just keep it under the same terms as Perl itself. no gatekeeping here. π«Ά
and that's the whole page, bestie! β¨ this one's from the User Contributed Perl Documentation section, shipped with perl v5.38.2, dated 2024-01-21. go forth and throw your exceptions with confidence ππ₯π¦
π¦ where this page comes from
- debian trixie: libconfig-scoped-perl 0.22-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libconfig-scoped-perl 0.22-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libconfig-scoped-perl 0.22-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libconfig-scoped-perl 0.22-5 Β· 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