PONAPI...teData(3pm)
πΈ NAME πΈ
PONAPI::Client::Request::Role::HasRelationshipUpdateData β it's a request role, bestie, and what it does is has relationship-update-data. That's the whole vibe. Also this is the 3pm page for the PONAPI...teData manpage (the terminal truncates the name because it simply cannot handle all that main character energy π
).
β¨ VERSION β¨
version 0.002012 π
π DESCRIPTION π
okay so. This role is literally the sibling of PONAPI::Client::Request::Role::HasData, except it's the glow-up version made specifically for relationship updates. π¦
Here's the tea: every other part of the spec is all "give me a hashref, that's it, that's the data." But relationship updates said not today and decided they're flexible. They'll take a hashref of data, sure β but they'll also take undef, or an arrayref. It's giving "I contain multitudes." πβ¨
# Replaces the specified relationship(s) with a one-to-one relationship to foo.
$client->update_relationships( ..., data => { type => "foo", id => 4 } );
# Replaces the
$client->update_relationships( ..., data => [ { type => "foo", id => 4 }, { ... } ] );
# Clears the relationship
$client->update_relationships( ..., data => undef );
$client->update_relationships( ..., data => [] );
(and yes, that second comment really does just say # Replaces the and then stop. she left us on read. we love her anyway π)
So to run it down: a single hashref = one-to-one, an arrayref = a whole lil collection of relationships, and undef or [] = clearing the relationship entirely. The undef and the empty arrayref both clear it, so pick your fighter. π₯
The underlaying repository decides whether the one-to-one or one-to-many difference is significant. (not us, not this role β we just pass the data along and mind our business π )
π AUTHORS π
- Mickey Nasriachi
<mickey@cpan.org> - Stevan Little
<stevan@cpan.org> - Brian Fraser
<hugmeir@cpan.org>
icons. legends. the blueprint. π«Ά
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2019 by Mickey Nasriachi, Stevan Little, Brian Fraser.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt. π₯
perl v5.36.0 π 2022-12-07 β that's the version and the date, bestie, and that's the whole page. mwah. ππΈπ
π¦ where this page comes from
- debian bookworm: libponapi-client-perl 0.002012-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libponapi-client-perl 0.002012-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libponapi-client-perl 0.002012-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libponapi-client-perl 0.002012-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libponapi-client-perl 0.002012-2 Β· 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