JSON::...:Error(3pm)

πŸ“¦
version 0.11 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– JSON::RPC::Common::Procedure::Return::Version_1_1::Error πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation, and the module we're obsessing over today is JSON::RPC::Common::Procedure::Return::Version_1_1::Error. say it with me. it's a mouthful but we love her for it πŸ’…


✨ NAME ✨

JSON::RPC::Common::Procedure::Return::Version_1_1::Error β€” the JSON-RPC 1.1 error class. that's it, that's the whole vibe. she's an error class and she knows it πŸ‘‘


πŸŽ€ VERSION πŸŽ€

version 0.11. locked in, no cap. 🫢


🌸 SYNOPSIS 🌸

here's how you'd actually summon her, in all her glory:

my $return_with_error = $call->return_error("foo");

that's it. that's the whole flex. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, fr fr: this class implements 1.1 error objects. periodt.

code and message? mandatory. not optional, not "maybe later", mandatory. you show up with both or you don't show up at all. πŸ’€

and here's the lil plot twist for you, iykyk: the data field is named error in the deflated version, and name is set to JSONRPCError. how exciting. 😭 honestly, iconic naming choices, we stan a confusing-but-consistent queen.

also, go read JSON::RPC::Common::Procedure::Return::Error β€” she's the mothership, this one's basically her daughter. SEE ALSO energy, but make it a sentence. 🧚


πŸ‘‘ AUTHOR πŸ‘‘

Yuval Kogman <nothingmuch@woobling.org> β€” the main character who brought her into this world. respect. 🫢


This software is copyright (c) 2014 by Yuval Kogman and others.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so go ahead, remix her, she's free β€” just keep the same terms as Perl 5 itself, bestie. 🌈


and that's the whole page, no notes. 10/10, would read again πŸ’–

okay so that was written for perl v5.30.3, dated 2020-06-23, straight from the JSON::...:Error(3pm) of it all. mwah. πŸ’‹ ✨ πŸŽ€

πŸ“¦ where this page comes from