in reply to Assigning Opsets by User Type
Also, you're doing a sort values %high_type, which is a lexical sort - but you want to sort numerically. It happens to go right because ord ("-") < ord ("0"), and you don't have numbers larger than 9 involved. But it ain't "maintainable".
Some maintainance problems: the regex used to breakdown the usertypes uses the same hardcoded keys as in %attr_value. The order in which the keys are put in %attr_value is messy. There are several "configuration" thingies (content of %attr_value, the trust levels, and what they are allowed to do), scattered all over the body of the subroutine. I'd group them, and preferably, take them outside of the sub.
Also, from your introduction, it appears that a "former programmer admin" is an illegal user type. But your sub will give it a strong trust_level.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Assigning Opsets by User Type
by djantzen (Priest) on Nov 20, 2002 at 16:54 UTC | |
by Abigail-II (Bishop) on Nov 20, 2002 at 18:06 UTC |