in reply to Re: Re: Module testing using passwords
in thread Module testing using passwords

We really don't have spare equipment to do this with, and I don't think I can make the assumption that a random sysadmin grabbing this from CPAN (should it end up there) will either. Perhaps you're talking about writing some sort of simulator?

Yup, a simulator is what I'm talking about - have a google for mock objects. You can do similar things with external code/servers. For example I have some tests for some code that talks to sendmail that fires up my own binaries. Because you're using a simple simulator you make it do whatever you want, making it much easier to test error handling code (e.g. how would you test a "real" server aborting a connection half way through).

I've been trying to avoid requiring Module::Build to be installed as a prerequisite for these packages (the main disadvantage of Module::Build over ExtUtils::MakeMaker is that it isn't (yet) included in the core).

Fair point. For me the pain in having to reinvent the wheels that Module::Build provides now outweigh the pain of having to get yet another module installed. As ever YMMV :-)

  • Comment on Re: Re: Re: Module testing using passwords