Documentation Center

Creating the CustomGetDocCatTweak module

A step-by-step procedure to create the custom CustomGetDocCatTweak module.

Procedure

  1. Copy the CustomGetDocCat.pm file to the filename, CustomGetDocCatTweak.pm.
  2. Open CustomGetDocCatTweak.pm in an ASCII editor.
  3. Delete the subroutines except for the subroutine sub new.
  4. Change the following:
    From:To:
    package CustomGetDocCat;package CustomGetDocCatTweak;
    use custom::CustomGetDocDefault;use custom::CustomGetDocCat;
    @ISA = qw(Exporter AutoLoader CustomGetDocDefault);@ISA = qw(Exporter AutoLoader CustomGetDocCat);
  5. Read through the CustomGetDocCat.pm and CustomGetDocDefault.pm files to learn about the callbacks you can override and what their base implementations are.
  6. Copy the sub routines you want to override from CustomGetDocCat.pm and CustomGetDocDefault.pm and paste them into your new custom module.
  7. Edit each of the copied subroutines for your needs and requirements.
  8. Delete or modify comments at start and end of module.
  9. Modify new, the constructor subroutine.
    Read the comments that are in the file. You usually do not need custom arguments however if you do need them, how to capture and store them is described below.
    The tool that uses this custom module is delivered in Contenta-home/encaps/adapters/testing and is named testExCat.pl. Its custom args variable is defined as follows:
    my $CustomArgs = "$g_prog|$CustomModule|$OptionalCkOutDir|extra Arg one|extra Arg two|";

    The values that are captured in $cusArg1 and $custArg2 are the last two fields in the pipe delimited string, extra Arg one and extra Arg two respectively.