Hi
Perrin,
Ive had similar issues as you are discussing here, and the approach ive come up with to work around them is as follows:
- set the enviornment variable PERL5LIB to be the root of your "lib development path". So for my machine its set to
perl5lib=d:\development\perl\devlib
Now anything in this path is treated as it would be if it were per/lib or perl/site/lib
-
From this directory use h2xs to create a module framework. There is a trick with this however. Once you do
h2xs -AXC -n Foo::Bar
Go into the Bar directory and move everything up 1 level. And then lose the Bar directory.
move *.* ..
rd Bar
-
Now to save yourself some pain (IMO) create a subdirectory of Foo called t. move the created test.pl into /t and rename it test.t
And now you need to edit the various files created by h2xs. Dont forget to add the /t directory to the MANIFEST, change the A.U.THOR name, specify your prerequisites in the makfile.pm and add documentation.
Once all of this is done,(assuming i havent forgotten some niggling but important detail) your module should be _both_ useable as normal and usable as per make. Thus once you are happy with the module you should be able to say
nmake
nmake test
nmake dist
A caveat however: this technique has the problem that you can only be developing 1 module at a time in each path/class heirarchy. Ie you cant work on Foo::Bar and Foo::Baz at the same time (the makefiles and etc would overwrite each other.)
To be honest, normally I develop a module in the devlib _without_ using h2xs first. Then I use h2xs and copy everything but the autogenerated .pm file into the appropriate directory.
As always with advice like this: YMMV
Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.