in reply to Re: Re: Re: MakeMaker, h2xs, and writing CPAN modules in thread MakeMaker, h2xs, and writing CPAN modules
If I started from scratch, I would do it that way. However, I want this to go to CPAN, and I don't want to fuss with MakeMaker myself, so using the skeleton generated by h2xs seems like the way to go. Unfortunately, h2xs does not generate a directory structure that works if you just try to use the modules in place without installing them.
Re^4: MakeMaker, h2xs, and writing CPAN modules
by stajich (Chaplain) on Jun 24, 2002 at 02:42 UTC
|
Okay - now that you mention it, I do remember h2xs being quite unhelpful when setting up namespaces. Aren't you kind of starting from scratch anyways though if you are creating modules with h2xs. Can you not just code up the correct directory and namespaces by hand or are you actually porting C code with h2xs? I think that the behavior is really quite unhelpful - I mean when you say you want h2xs -X -A -n Foo::Bar you shold get Foo/Bar.pm, no? But you get Foo/Bar/Bar.pm - maybe there's a cmd line arg that I am ignorant of.
Now I think that setting up a Makefile.PL is actually really easy (barring the too many files problem), are you sure you can't just do:
<code>
(Makefile.PL)
WriteMakefile(
'NAME' => 'Foo::Bar'
'VERSION' => '0.01',
'$] >= 5.005 ? ## add keywords that 5.005 and beyond support
('AUTHOR' => 'perrin')
);
Am I oversimplifying your needs? I found that a lot of the Exporter and AUTOLOAD crap that comes with the basic h2xs skeleton was causing me the problems when I just tried to test the install - I make sure and run h2xs with -A to avoid any problems resulting from that. | [reply] |
|