Google Groupes n'accepte plus les nouveaux posts ni abonnements Usenet. Les contenus de l'historique resteront visibles.

Writing modules

6 vues
Accéder directement au premier message non lu

Michael Snoyman

non lue,
28 août 2006, 11:30:3328/08/2006
à perl6...@perl.org
Hi,

I wanted to start working on a module (mainly to learn Perl 6, I doubt
anyone would ever want to use it). I want to do this "properly," whatever
that means. I was wondering if someone could explain to me:

1) How to construct the Makefile.pl
2) How exactly to set up and run tests

I realize that there are lots of modules to look at in the Pugs
distribution, but as far as I can tell they are meant to be built from
within the Pugs source tree, and since my code clearly won't be living there
I'd rather not write it there either.

Thanks,
Michael

Gaal Yahas

non lue,
29 août 2006, 12:36:1929/08/2006
à Michael Snoyman,perl6...@perl.org
On Mon, Aug 28, 2006 at 08:30:33AM -0700, Michael Snoyman wrote:
> I wanted to start working on a module (mainly to learn Perl 6, I doubt
> anyone would ever want to use it). I want to do this "properly," whatever
> that means. I was wondering if someone could explain to me:
>
> 1) How to construct the Makefile.pl
> 2) How exactly to set up and run tests

I wouldn't worry about Makefile.PL that much if my module wasn't meant
to be widely distributed. In practice, we don't even have ready build
tools (like a Perl port of EU::MM / M::B / M::AI). If it does matter to
you, though, look at how modules in ext/ in the Pugs source tree do it.

As for tests, that's much more important :-) What you can benefit
from writing depends on what your module does. If you want primarily
functional tests the Pugs distro is again a very good example. Do use
our Test.pm (if you plan to use Pugs for development). It's very much in
the spirit of the Perl 5 testing tools, but it's in fact arguably easier
to use because all the goodies are in one place.

> I realize that there are lots of modules to look at in the Pugs
> distribution, but as far as I can tell they are meant to be built from
> within the Pugs source tree, and since my code clearly won't be living there
> I'd rather not write it there either.

Then at least read there. Good luck :-)

--
Gaal Yahas <ga...@forum2.org>
http://gaal.livejournal.com/

0 nouveau message