Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
No such thing as a small change
 
PerlMonks  

Re^2: Application Testing: Custom Module or Perl Test Files?

by geektron (Curate)
on Sep 07, 2005 at 23:50 UTC ( #490033=note: print w/ replies, xml ) Need Help??


in reply to Re: Application Testing: Custom Module or Perl Test Files?
in thread Application Testing: Custom Module or Perl Test Files?

Personally, I think using Module::Starter to create your test module is overkill, as most of Module::Starter is oriented to creating a framework for packaging up modules for distribution which you don't really need.

I've been using ExtUtils::ModuleMaker instead of Module::Starter, though both focus on getting a developer started.

i'd disagree about them being overkill, though, because they do create the basic organizational structure (directories, stub test files, etc) to get one in the habit of testing.

additionally, at least ExtUtils::ModuleMaker has options to create multiple modules, which is *very* convenient.


Comment on Re^2: Application Testing: Custom Module or Perl Test Files?
Re^3: Application Testing: Custom Module or Perl Test Files?
by xdg (Monsignor) on Sep 08, 2005 at 01:04 UTC

    The more general point I was making was that when making a module to help with testing some other module or application, creating it with a whole distribution skeleton (README, MANIFEST, Changes, etc.) is unnecessary, whether using Module::Starter, Extutils::ModuleMaker or h2xs or something else entirely. It's sufficient to just create a .pm file and stick it in t/ directory.

    (N.B I'm the author of ExtUtils::ModuleMaker::TT, so, yes, I'm a fan of the ExtUtils::ModuleMaker school. And kudos to jkeenan1 for his recent updates!)

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      (N.B I'm the author of ExtUtils::ModuleMaker::TT, so, yes, I'm a fan of the ExtUtils::ModuleMaker school. And kudos to jkeenan1 for his recent updates!)

      heheheh.

      i've jumped on the testing team for ExtUtils::ModuleMaker, because i'd like to participate more, plus there are a few enhancements i'd like to see.

      the only reason i made my comment was that even if it can be considered "overkill" to use ExtUtils::ModuleMaker just to start testing, having that skeleton there helps one *remember* what's needed.

        I'd like to see the addition of pod-coverage.t and pod.t like in Module::Starter

        Walking the road to enlightenment... I found a penguin and a camel on the way.....
        Fancy a yourname@perl.me.uk? Just ask!!!
Re^3: Application Testing: Custom Module or Perl Test Files?
by ghenry (Vicar) on Sep 08, 2005 at 20:46 UTC

    I couldn't find where in the ExtUtils::ModuleMaker docs it mentions creating multiple modules, but in Module::Starter it shows it:

    module-starter --module=Foo::Bar,Foo::Bat \ --author="Andy Lester" --email=andy@petdance.com

    Maybe I completely missed it?

    Oh, and I like the look of Module::Starter::PBP:

    Module::Starter::PBP - Create a module as recommended in "Perl Best Practices"

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!
      well, here's a slightly edited script i used to start creating a bundle of modules for a project i'm trying to finish:
      #!/usr/bin/perl use ExtUtils::ModuleMaker; my $mod = ExtUtils::ModuleMaker->new( NAME => 'ConferenceBuilder', EXTRA_MODULES => [ { NAME => 'ConferenceBuilder::Foundation' }, { NAME => 'ConferenceBuilder::Instance' }, { NAME => 'ConferenceBuilder::Accreditations' }, { NAME => 'ConferenceBuilder::Products' }, { NAME => 'ConferenceBuilder::Sessions' }, { NAME => 'ConferenceBuilder::Addons' }, ], AUTHOR => { NAME =>'geektron', EMAIL => 'me@email.com', ORGANIZATION => 'Dis.Organized', WEBSITE => 'http://www +.perlmonks.org' }, VERSION => '0.01', LICENSE => 'artistic', ); $mod->complete_build();
      just chmod it to executable, and run.

      it made all the modules in the ConferenceBuilder tree and ConferenceBuilder.pm

        Ah, that way ;-)

        Why not add:

        PERMISSIONS => '0755';
        Then you don't need to chmod it.

        Walking the road to enlightenment... I found a penguin and a camel on the way.....
        Fancy a yourname@perl.me.uk? Just ask!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://490033]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (14)
As of 2014-04-18 13:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (468 votes), past polls