Scroll to navigation

UR::Object::Type::ModuleWriter(3pm) User Contributed Perl Documentation UR::Object::Type::ModuleWriter(3pm)

NAME

UR::Object::Type::ModuleWriter - Helper module for UR::Object::Type responsible for writing Perl modules

DESCRIPTION

Subroutines within this module actually live in the UR::Object::Type namespace; this module is just a convienent place to collect them. 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.

METHODS

  $classobj->resolve_module_header_source();
    

Returns a string that represents a fully-formed class definition the the given class metaobject $classobj.

  $classobj->resolve_class_description_perl()
    

Used by resolve_module_header_source(). This method inspects all the applicable properties of the class metaobject and builds up a string that gets inserted between the {...} of the class definition string.

  $classobj->rewrite_module_header();
    

This method rewrites an existing Perl module file in place for the class metaobject, or creates a new file if one does not already exist.

Returns the pathname of the class's module relative to the top level directory of that class's Namespace.
Returns the fully qualified pathname of the class's module.
Returns the text of the class's Perl module as a list of strings.
Returns the text of the class's Perl module as a single string.
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.
Returns the text of the class's Perl module source where the class definition is as a list of strings.
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

2019-01-02 perl v5.28.1