Uploaded image for project: 'Apache Lucy-Clownfish'
  1. Apache Lucy-Clownfish
  2. CLOWNFISH-64

Autogenerate subroutine code samples in Perl POD

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.5.0
    • Perl
    • None

    Description

      It should be possible to add autogenerated code samples for constructors and methods to the generated Perl POD. This would ensure that every subroutine has at least some rudimentary documentation of parameters even if `@param` directives are missing, and that default values are always documented. Furthermore, it would relieve authors from providing code samples manually. The general format could look like:

      $object->method(
          param1 => $value1, # required
          param2 => $value2, # default: xxx
      );
      

      The name of the invocant $object can be derived from the class name, the names of the values from their types. For example:

      $searcher->hits(
          query      => $obj,       # required
          offset     => $uint32,    # default: 0
          num_wanted => $uint32,    # default: 10
          sort_spec  => $sort_spec, # default: undef
      );
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            nwellnhof Nikolas Wellnhofer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: