UR::Ob...Writer(3pm)

πŸ“¦
version 0.470 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– 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::Type
  • UR::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