On Dec 10, 2003, at 4:39 AM, Ben Crane wrote:
Just sat done and put together my FIRST MODULE!!!!
congratulations.
[..]
[..]I have been playing around with h2xs and getting really confused. If I understand this, the *.pm file is standalone and will work on pretty much any platform?? So if I write another one completely from scratch using this rough template it is effectively a perl module that I can distribute?? Surely it can't be THAT easy??
One problem at a time, remember to breath.
a. yes it is that easy to make Perl Modules b. IF you are planning on distributing them, it is best to become good friends with h2xs so that you can follow the traditional form.
my pet favorite way to use h2xs to start a project that I plan to distribute is the simpler
h2xs -AX <package_name_here>
cf: <http://www.wetware.com/drieux/CS/Proj/PID/#TheTypeScript>
What may be causing some 'issues' is that
Makefile.PL
and how complex does it really need to be for relatively simple projects. Start small, start simple, and build up from there. { cf perldoc ExtUtils::MakeMaker }
It appears that perl5.8.1 rev of h2xs has some
minor changes:
[jeeves: 28:] h2xs -AX Wetware::Pid
Defaulting to backwards compatibility with perl 5.8.1
If you intend this module to be compatible with earlier perl versions, please
specify a minimum perl version with the -b option.
Writing Wetware/Pid/Pid.pm Writing Wetware/Pid/Makefile.PL Writing Wetware/Pid/README Writing Wetware/Pid/t/1.t Writing Wetware/Pid/Changes Writing Wetware/Pid/MANIFEST [jeeves: 29:]
So now you start with the 'first test' in the "t/" to help you start growing out your basic static testing.
It will also gin up that Changes File, which will help keep your 'when and why' notes on what changed. { also best to keep track of who filed which bug on what...}
The MANIFEST will help keep track of all of the files. The README is important as it covers everything not covered elsewheres - and if you do not yet have a default license file that you would include it has a prototype.
So that offers you the base Frame Work to work with.
NOW comes the 'big uglies' about the design philosophy issues - Unless you are Lincoln Stein, do not try to make your module BOTH OO-ish and Procedural, it can be done - but pick one or the other.
I come from the 'put the POD in a Foo.pod file' school, others come from the 'interleave pod and code', while some are true believers of the 'pod at the end'. But think about how other persons pod has helped you, do the same.
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>