CPANPL...ternals(3pm)
π CPANPLUS::Internals β bestie, this is the CPANPLUS internals π
okay so real talk, the manual page you're holding is CPANPL...ternals(3pm) from the User Contributed Perl Documentation crew, and it is the deep-lore page for CPANPLUS::Internals. no cap. it's giving backstage-pass energy. ποΈβ¨
π¦ SYNOPSIS π¦
my $internals = CPANPLUS::Internals->_init( _conf => $conf );
my $backend = CPANPLUS::Internals->_retrieve_id( $ID );
that's it. that's the whole vibe check. two lines and you're in. π
πΈ DESCRIPTION πΈ
okay so this module is literally the guts of CPANPLUS β like, the whole inner ecosystem, the plumbing, the main character organs. π«
and here's the iconique part: it inherits from all other modules in the CPANPLUS::Internals::* namespace, which means it is fully out here defying normal rules of OO programming. not me casually breaking object orientation like it's nothing ππ
but bestie, if you're reading this page, you already know what's going on ;) so. you get it. iykyk.
π if you want the normal API β the one that doesn't require a secret handshake β please read the CPANPLUS::Backend documentation. that's the front door. this page is the trapdoor. π
β¨ ACCESSORS β¨
_confβ get/set the configure object. π_idβ get/set the id. π’
π METHODS π
π $internals = CPANPLUS::Internals->_init( _conf => CONFIG_OBJ )
_init creates a brand new CPANPLUS::Internals object. new object, fresh start, no baggage. π
you have to pass it a valid CPANPLUS::Configure object β that's not optional, bestie, it's the whole entrance fee.
- returns the object on success π
- dies on failure π (dramatic? yes. accurate? also yes.)
π $bool = $internals->_flush( list => \@caches )
flushes the designated caches from the CPANPLUS object. spring cleaning but for memory. π§Ήβ¨
- returns true on success
- returns false if one or more caches could not be flushed
π§ $bool = $internals->_register_callback( name => CALLBACK_NAME, code => CODEREF )
registers a callback for later use by the internal libraries. set it now, let it cook. π₯
here's the list of the callbacks that are currently used:
install_prerequisiteβ is called when the user wants to be "asked" about what to do with prerequisites. should return a boolean: true to install the prerequisite, false to skip it.send_test_reportβ is called when the user should be prompted if he wishes to send the test report. should return a boolean: true to send the test report, false to skip it.munge_test_reportβ is called when the test report message has been composed, giving the user a chance to programmatically alter it. should return the (munged) message to be sent. βοΈedit_test_reportβ is called when the user should be prompted to edit test reports about to be sent out byTest::Reporter. should return a boolean: true to edit the test report in an editor, false to skip it.proceed_on_test_failureβ is called when'make test'or'Build test'fails. should return a boolean indicating whether the install should continue even if the test failed. (test failed but we ball? that's the question this callback answers π)munge_dist_metafileβ is called when theCPANPLUS::Dist::*metafile is created, likecontrolforCPANPLUS::Dist::Deb, giving the user a chance to programmatically alter it. should return the (munged) text to be written to the metafile. π
π $bool = $internals->_add_to_includepath( directories => \@dirs )
adds a list of directories to the include path. which means they get added to @INC as well as $ENV{PERL5LIB}. two places, one call, efficiency slay. π
- returns true on success, false on failure.
π $bool = $internals->_add_to_path( directories => \@dirs )
adds a list of directories to the PATH β but only if they actually contain anything. empty folders need not apply. π
- returns true on success, false on failure.
β $id = CPANPLUS::Internals->_last_id
return the id of the last object stored. the most recent one. the baby of the family. πΆ
π¦ $id = CPANPLUS::Internals->_store_id( $internals )
store this object; return its id. put it in the vault, get the receipt. π
π₯ $obj = CPANPLUS::Internals->_retrieve_id( $ID )
retrieve an object based on its ID β return false on error. no object? you get a false. that's the deal. π€
πΈ CPANPLUS::Internals->_remove_id( $ID )
remove the object marked by $ID from storage. gone. deleted. not coming back. π¨
π @objs = CPANPLUS::Internals->_return_all_objects
return all stored objects. the whole friend group, everyone accounted for. π«Ά
π«Ά heads up bestie: those last few (_last_id,_store_id,_retrieve_id,_remove_id,_return_all_objects) are class methods β you call them onCPANPLUS::Internalsitself, not on an instance. the more you know. β¨
and that's the whole page, babes β no notes, ate and left no crumbs. π
this lil tour was brought to you by perl v5.40.1, dated 2025-03-01, and filed under CPANPL...ternals(3pm) in the User Contributed Perl Documentation section. go be iconic with your internals. mwah. πππ¦
π¦ where this page comes from
- debian trixie: libcpanplus-perl 0.9916-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcpanplus-perl 0.9916-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcpanplus-perl 0.9916-1 Β· 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