Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jk2addict (4946)

jk2addict
  (email not shown publicly)
http://today.icantfocus.com/blog/
AOL IM: chrislaco (Add Buddy, Send Message)
Yahoo! ID: chrislaco@sbcglobal.net (Add User, Send Message)
Jabber: laco@scribblewerks.com

Journal of jk2addict (4946)

Thursday March 17, 2005
11:36 AM

Using Test::MockObject For Good And Evil

[ #23701 ]

I've posted this at PerlMonks, but it's worth some time here as well.

I'm entertaining the idea of writing Test::CPANTS. During the development process, I want to be able to test my kwalitee rating (keeping it at 16) every time I get ready to release a new version of a module.

I've taken a look and Modules::CPANTS::Generator. Most of it looks reusable (like the individual test modules); but a good portion of it ::Generator seems to be based around the idea the I'm going to download a dist and use that. In the case of a Test::CPANTS, I'm really trying to work with the local lib/blib part of the dist to be tested.

This brings my to my question. Is it ok to use Test::MockObject for good (test.pl, t/*.t) AND evil; fooling Modules::CPANTS::Generator into using my local hacks to get it and CPANPLUS to not download things, but intead to use the local dist directory and a non-existant .tar.gz dist?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • One I thing I have on my CPANTS TODO list for ages is something like a 'lint' script which just takes a dist (Foo-Bar-0.42.tgz) ans runs all CPANTS tests on it. So one can check for kwalitee before uploading to CPAN and then beeing publicly humilated :-)

    In theroy you should be able to use all the various Module::CPANTS::Generator::* modules and the test contained in them, but I never actually tried it. Hmm, mabye it's time for more CPANTS refactoring...