Author image Michael Roberts
and 1 contributors


WWW::Modbot::Test::CountLinks - count link-like text in a given field.


Version 0.01


The WWW::Modbot::Test::CountLinks module is a WWW::Modbot::Test implementation which looks at a text field and counts the things in it that look like links. See the W::M::Test module for more information about the API.

It knows about HTML, simple text http: links, and [url]-type links.



The new function doesn't really do anything, but if we don't provide one, will try to call itself.


All Test modules have only one function, test. It's passed a hashref containing the fields of the post, and a field name which need not be used. The function sets one or more fields in the hashref which are then evaluated by the ruleset to arrive at a score. The return value is a list of the fields set by the function (this makes testing of modules easier).


Michael Roberts, <michael at>


Please report any bugs or feature requests to bug-www-modbot at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


Copyright 2008 Vivtek, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.