http://qs1969.pair.com?node_id=490033


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.

Replies are listed 'Best First'.
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!!!