[Rt-devel] PATCH: autohandler WebExt* attr handling fixes

Jim Meyer purp at acm.org
Fri Mar 31 00:59:33 EST 2006


Hello!

On 3/30/06, Jesse Vincent <jesse at bestpractical.com> wrote:
> *bzzt* Illegal use of internals. 200 line penalty. (Also, this code
> feels less readable to me. But it might be a lot better with only a very
> little bit of feedback
>
> +                # Fetch the core attrs, dropping any we want to ignore
> +                my @core_attrs = grep {!/^${ignore_regex}$/}
> +                  keys(%{$UserObj->_CoreAccessible});
> +

I was hoping that'd be acceptable in something as deep and mysterious
as the autohandler, which feels like an internal itself.

Would you accept a patch to RT::Record which adds
AccessibleAttributes(), a function which consolidates the
attribute-finding logic in _BuildTableAttributes() and isn't an
internal? I'll throw in refactoring _BuildTableAttributes() for free
(and reduce it to one "foreach my $attr ...", even =) and rebase that
autohandler work on $UserObj->AccessibleAttributes() instead.

As to readability, I'm wide open to feedback. =]

Cheers!

--j

p.s. the previous patch also had a typo, calling for "$valid_attr"
instead of "$valid_attrs". Sorry. =\
--
Jim Meyer, Geek at Large                                    purp at acm.org


More information about the Rt-devel mailing list