On Fri, May 28, 2021 at 09:52:25AM +0300, Henrik K wrote: > > The current (legacy) way that DecodeShortURLs works need to be changed. > Calling got_hit() for random rules that are not defined, especially things > like SHORT_C<SHORTENER>_C<CODE> should not be used. One can't score them > properly and it also breaks the upcoming meta-rule logic. All of the checks > need to have dedicated eval: rules.
Also I'm not sure what's the point of these rules SHORT_URL_200 SHORT_URL_404 If there's multiple shorteners in a message, you might get both results or maybe even neither. Also at a quick glance, those cannot even hit if result is cached, since the cache doesn't store return codes. And stuff like $self->{short_url_chained} isn't even reset, so it might keep hitting in new messages. This module needs a lot of extra love.