|Perl: the Markov chain saw
Re: Developing a module, how do you do it ?by grantm (Parson)
|on Feb 29, 2012 at 07:07 UTC
I'm wondering if you're using regression testing. The fact that you need to install stuff regularly suggests that perhaps you're doing that to manually test each small change. My workflow is to make changes to tests and code in parallel and regularly run prove -l or make test (or dzil test for code that I package with Dist::Zilla). When I'm happy that I have the required features working, then I build a package and install it. If you're not familiar with Perl's regression testing tools, this document might help.
Also I'm sure you realise this, but just in case you don't ... a distribution can contain more than one module. So you might use Module::Starter to generate a skeleton distribution including a .pm file under the lib directory. But you can put other (related) modules in the same lib directory so when you develop your code and your tests, the family of modules are developed together. Then a make install will install them all. To put it another way: if you want to make 5 related modules you don't need to run Module::Starter 5 times.
You might also get some mileage out of setting the PERL5LIB environment variable to point to the lib directory containing the code you're currently working on. Then when you run a script it will use the development version of anything it finds in that directory and the installed version of everything else.