program.pl has lengthy hard to read CONSTANT initalization section
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MVHub |
Fix Released
|
Medium
|
frank allaby |
Bug Description
files:
app-
There are many, many initialization lines like:
my $MODE_REMOVE_
...at the top of the file. You have to read a bunch of kruft before you get a chance to read the block:
{ #main
}
to increase legibility create a create sub routines:
sub init_consts {
my %k=(
# ....
);
return %k
}
and:
sub init_fields_
my @fields =qw/
/;
return @fields;
}
and then before main do:
my %k=init_consts();
and then replace $CONSTANT with $k{CONSTANT};
Changed in mvhub: | |
assignee: | nobody → Nicholas Lavertue (nlavertue) |
tags: |
added: refactor removed: refac |
Changed in mvhub: | |
assignee: | Nicholas Lavertue (nlavertue) → frank allaby (fallaby) |
Changed in mvhub: | |
status: | Confirmed → Fix Released |