Test::S...adAJSON(3)
β¨ Test::Smoke::Util::LoadAJSON(3) β¨
okay bestie, so this is the manual page for Test::Smoke::Util::LoadAJSON and honestly? it's short, it's sweet, it's giving "little utility that carries the whole squad" π
πΈ NAME πΈ
Test::Smoke::Util::LoadAJSON β a Cpanel::JSON::XS / JSON:PP / JSON::XS Factory Class π
π SYNOPSIS π
use Test::Smoke::Util::LoadAJSON;
my $json = Test::Smoke::Util::LoadAJSON->new->utf8->pretty->encode(\%data);
literally one line of setup and you're off, no cap β¨
π¦ DESCRIPTION π¦
so like. this is purely a fallback factory class that helps keep our code clean. that's the whole assignment, and it ate. π
it exists for the girlies with a clean perl 5.14+ install who have JSON::PP but not JSON. also for people who installed JSON::XS on a pre-5.14 system. we see you, we got you. π«Ά
it also checks for $ENV{PERL_JSON_BACKEND} to force either of the two. so if you wanna be bossy about which backend shows up, that's the vibe check you need to pass. π
π§ my $class = Test::Smoke::Util::LoadAJSON->find_base_class()
on success, returns one of: Cpanel::JSON::XS, JSON::PP, JSON::XS β¨
returns undef on failure. (yes, the void, the nothing, the ghosting π)
π JSON
returns the current $json_base_class. that's it. that's the whole thing. iconic. π
π my $obj = Test::Smoke::Util::LoadAJSON->new(<arguments>)
if a base class is found, it will return an instantiated object. slay. π
β οΈ heads up though β this will die() if no base class could be found. like, full-on dramatic exit. no object for you, bestie. π
π COPYRIGHT π
Β© MMXIV-MMXXIII, All rights reserved.
- Abe Timmerman
<abeltje@cpan.org>
this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. fr fr, go wild (respectfully). πΈ
see:
this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. so like, it's giving hope and vibes, not legal guarantees. π
and that's the whole page, bestie π this one's from perl v5.42.0, dated 2025-07-25 β mwah, go forth and JSON responsibly πβ¨
π¦ where this page comes from
- fedora 43: perl-Test-Smoke 1.84-2.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms