nodebunny has asked for the wisdom of the Perl Monks concerning the following question:

Hey there Monks!

So I have a confession to make, I haven't been using the module setup, makefile, or tests that I've been learning about -- I've only been writing perl right out of the box.

I would like to get started using modules and tests, but I don't know how to modularify the code I've already started working on!

I've been looking over the Test::Simple Test::More pods to see what the functions do, and how I can use them --

Do you have any suggestions on how I can start using these packaging/testing tools with code I've already started on while minimizing the pain and distraction of setting it all up?
  • Comment on Getting started with Perl Modules and Test::Simple

Replies are listed 'Best First'.
Re: Getting started with Perl Modules and Test::Simple
by davido (Cardinal) on Sep 28, 2011 at 20:33 UTC

    Intermediate Perl (O'Reilly). It will get you started on modules, and testing.

    There are a lot of "ways to do it", but for simple cases, I start with Module::Starter (module-starter command). You can create a module template with that tool (including the test directory, etc.). If you already have some code, you can paste it into the module template. Then start working on tests right away!

    I don't see much benefit in working with Test::Simple, since Test::More contains Test::Simple's functionality plus more, without much additional fuss.


    Dave

Re: Getting started with Perl Modules and Test::Simple
by Anonymous Monk on Sep 28, 2011 at 20:21 UTC