CPANPL...end::RV(3pm)

πŸ“¦
version 0.9916 Β· 5 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– CPANPLUS::Backend::RV πŸ’–

okay so bestie, welcome to CPANPLUS::Backend::RV β€” the return value objects module from the Perl User Contributed Perl Documentation. yes it's a mouthful, yes the name gets truncated in the header, we move. ✨


🌸 NAME 🌸

CPANPLUS::Backend::RV β€” return value objects, periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

    ### create a CPANPLUS::Backend::RV object
    $backend_rv     = CPANPLUS::Backend::RV->new(
                                ok          => $boolean,
                                args        => $args,
                                rv          => $return_value
                                function    => $calling_function );

    ### if you have a CPANPLUS::Backend::RV object
    $passed_args    = $backend_rv->args;    # args passed to function
    $ok             = $backend_rv->ok;      # boolean indication overall
                                            # result of the call
    $function       = $backend_rv->function # name of the calling
                                            # function
    $rv             = $backend_rv->rv       # the actual return value
                                            # of the calling function

like, copy that, paste that, you're already halfway there. no cap. 🫢


✨ DESCRIPTION ✨

This module hands you return value objects for multi-module calls to CPANPLUS::Backend. And here's the cute part β€” in boolean context it returns the status of the overall result, i.e. literally the same thing the "ok" method would give you. so you can just vibe-check it directly. πŸ”₯


πŸ‘‘ METHODS πŸ‘‘

πŸŽ€ new( ok => BOOL, args => DATA, rv => DATA, [function => $method_name] )

Makes you a brand new CPANPLUS::Backend::RV object out of the data you hand it.

bestie, real talk: this method should only be called by CPANPLUS::Backend functions. the accessors, though? those are yours, go ahead and use them to inspect an RV object. πŸ‘€

All the argument names can be used as accessors later to retrieve the data. so whatever you name on the way in, you can pull back out. iconic behaviour honestly.

Arguments:

  • ok β€” Boolean indicating overall success. it's giving yes/no, success/fail, slay/flop. βœ…
  • args β€” The arguments provided to the function that returned this rv object. super useful to inspect later so you can see what was actually passed to the function in case of an error. detective mode activated πŸ”
  • rv β€” An arbitrary data structure that has the detailed return values of each of your multi-module calls. the receipts, basically. 🧾
  • function β€” The name of the function that created this rv object. Can be explicitly passed. If not, new() will try to deduce the name from caller() information. sneaky but smart. 🧚

πŸ’€ BUG REPORTS πŸ’€

Please report bugs or other issues to bug-cpanplus@rt.cpan.org. don't be shy, they wanna hear it. πŸ™ˆ


🌈 AUTHOR 🌈

This module by Jos Boumans kane@cpan.org. πŸ’œ


The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans kane@cpan.org. All rights reserved.

This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. 🫢


and that's the whole page, bestie. πŸ’…

shoutout to perl v5.40.1, dated 2025-03-01 β€” that's the version and the date this lil doc was living its truth, mwah πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from