Modify

Ticket #360 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Ambiguous definition for sub parameters

Reported by: ejhernandez@… Owned by: juruen@…
Milestone: 0.9 Component: documentation
Severity: trivial Keywords: naturaldocs parameter
Cc:

Description

Since Perl accept positional and hashed parameters, we can make methods/functions/procedures with different way to get parameters.

This ticket should set an standard way to document parameters saying if they are positional or hash based.

Attachments

Change History

comment:1 Changed 6 years ago by juruen@…

Most of the documented subs across eBox are using positional parameters. Each parameter is "named" just for the sake of clarification.

To document if parameters are named or positional in naturaldocs. Write a blank line and a bulletin followed by optional or named after the listed parameters.

To express if a parmeter is optional, add to the parameter description *(Optional)*

As a rule of thumb, and following the idea depicted in Perl Best Practices we should:

  • use positional parameters if their number is <= 3
  • use named parameters if > 3

comment:2 Changed 6 years ago by juruen@…

  • Status changed from new to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.