Modify ↓
Ticket #360 (closed defect: fixed)
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
Note: See
TracTickets for help on using
tickets.
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: