On 9/20/2010 8:15 AM, Steve Freegard wrote:
> On 17/09/10 14:48, RW wrote:
>>
>> I think it might be better to take the "blocked page" handling out of
>> the perl and turn it into an ordinary uri rule.
>>
>
> Yeah; really don't know why I did it like that in the first place.
>
> I've just uploaded version 0.2 which does it this way instead and adds
> the following rule:
>
> uri  URI_BITLY_BLOCKED  /^http:\/\/bit\.ly\/a\/warning/i

You can get rid of the 'backslashitis' by using a different delimiter.

uri  URI_BITLY_BLOCKED  m~^http://bit\.ly/a/warning~i

You still need to escape the period, but since the tilde (~) is now the
delimiter rather than the slash, you don't need to escape all the
slashes.  This is very useful for URI patterns!  Just remember that you
will now need to escape the new delimiter if it appears in the regex.

-- 
Bowie

Reply via email to