Menu

#187 Perl variables: Default value

open
nobody
Symbols (7)
5
2012-09-14
2011-05-17
pwa0202
No

When defining Perl variables using 'my' or 'our', it is common to assign a "default" value, like so:

our $eatMeat = "no"; # Indicates whether meat is eaten or not; "yes"=meat is eaten.

It would be very useful if ND could detect the default value and incorporate it into the generated documentation, like

my $eatMeat [Default = "no"]
Indicates whether meat is eaten or not; "yes"=meat is eaten.

Alternatively, the "[Default = ...]" string could be appended to the description, like

my $eatMeat
Indicates whether meat is eaten or not; "yes"=meat is eaten. [Default = "no"]

The "inline comment" description is another enhancement requested by someone else, #3303584 (https://sourceforge.net/tracker/?func=detail&aid=3303584&group_id=81796&atid=564052)

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.