UR::Ob...Writer(3pm)
π NAME π
UR::Object::Type::ModuleWriter β bestie, this is the helper module for UR::Object::Type, and its whole job is writing Perl modules β¨
π¦ DESCRIPTION π¦
Okay so here's the tea: the subroutines in this module actually live in the UR::Object::Type namespace. This module is just a convenient lil spot to collect them all together, iykyk π
The Module Writer is used by the class updater system (UR::Namespace::Command::Update::Classes and ur update classes) to add, remove and alter the Perl modules behind the classes within a Namespace. She's the one doing the actual βοΈ writing, no cap.
β¨ METHODS β¨
π
resolve_module_header_source
$classobj->resolve_module_header_source();
Returns a string that represents a fully-formed class definition for the given class metaobject $classobj. It's giving... the whole class, as text πΈ
π resolve_class_description_perl
$classobj->resolve_class_description_perl()
Used by resolve_module_header_source(). This one inspects all the applicable properties of the class metaobject and builds up a string that gets inserted between the {...} of the class definition string. She's the interior decorator of your class def, fr fr π
π rewrite_module_header
$classobj->rewrite_module_header();
This method rewrites an existing Perl module file in place for the class metaobject, or creates a brand new file if one doesn't already exist. Main character energy: she'll fix up what's there, or manifest something new π¦
π module_base_name
Returns the pathname of the class's module relative to the top level directory of that class's Namespace. Short and relative, just vibes π«
β module_path
Returns the fully qualified pathname of the class's module. The whole thing, no crumbs left behind π
π module_source_lines
Returns the text of the class's Perl module as a list of strings. One line at a time, like a lil playlist πΆ
π§ module_source
Returns the text of the class's Perl module as a single string. Same text, one big string, periodt π
π₯ module_header_positions
Returns a 3-element list ($begin, $end, $use) where $begin is the line number where the class header begins. $end is the line number where it ends. $use is the line number where the module declares that it use's a Namespace. Coordinates, bestie β she's telling you exactly where everything lives π
πΈ module_header_source_lines
Returns the text of the class's Perl module source where the class definition is, as a list of strings.
π module_header_source
Returns the text of the class's Perl module source where the class definition is, as a single string.
π SEE ALSO π
UR::Object::TypeUR::Object::Type::Initializer
okay that's the whole page, bestie π«Ά this was UR::Ob...Writer(3pm) from the User Contributed Perl Documentation, hanging out in perl v5.32.1, dated 2022-01-17. go forth and write modules, you absolute icon πβ¨
π¦ where this page comes from
- debian bookworm: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libur-perl 0.470+ds-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