[MetaCPAN] [PATCH] Handle OFTC IRC links

Marius Gavrilescu marius at ieval.ro
Sat May 2 18:31:57 GMT 2015


Shlomi Fish <shlomif at shlomifish.org> writes:

> Thanks for sharing! One thing that is apparent is that there's quite a lot of
> duplicate code between the clause you added and the Freenode one. Perhaps they
> can be extracted into a common subroutine or closure.

A simpler way to avoid duplication is to use capture groups, as in the
attached (again, untested) patch.

A more generic solution is certainly possible, but I do not think the
added complexity is worthwhile. I believe there aren't many networks
that 1) are widely used and 2) ban Mibbit.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Handle-OFTC-IRC-links.patch
Type: text/x-diff
Size: 1048 bytes
Desc: not available
URL: <http://lists.scsys.co.uk/pipermail/metacpan/attachments/20150502/3580af56/attachment.patch>
-------------- next part --------------
-- 
Marius Gavrilescu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.scsys.co.uk/pipermail/metacpan/attachments/20150502/3580af56/attachment.pgp>


More information about the MetaCPAN mailing list