Most CPAN modules have tests in either test.pl or the t/*.t files. Take a look at cpan.org: here are the tests for CGI.pm for example.
update: other links that might be of interest:
A Test::MockObject Illustrated Example
Unit Testing @ extremeperl.org
update2: also take a look at
In reply to Re: How to write code tests
by Joost
in thread How to write code tests
by tcf03
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |