Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Module Building and h2xs

by mitd (Curate)
on Nov 02, 2000 at 02:08 UTC ( #39517=perlquestion: print w/ replies, xml ) Need Help??
mitd has asked for the wisdom of the Perl Monks concerning the following question:

I am back building modules. In the past I have always hand built file/package structure, Makefile.pl etc because I have always had trouble getting h2xs -X -n Foo::Bar to do what I want.

So here's what it(h2xs) does:

h2xs -X -n Foo::Bar produces; Foo/Bar/Bar.pm with Bar's package name as 'package Foo::Bar' now if you use Foo::Bar; it of course is not found, you need use Foo::Bar::Bar;

What I want is:

Foo/Bar.pm

Am I missing something or does h2xs just work as it appears and I still need to move stuff around by hand to get what I want.

Thanks.

mitd-Made in the Dark
'My favourite colour appears to be grey.'

Comment on Module Building and h2xs
Select or Download Code
Re: Module Building and h2xs
by dchetlin (Friar) on Nov 02, 2000 at 02:30 UTC
    I usually do h2xs -X -n Foo-Bar and then rename `Foo-Bar.pm' to Bar.pm and put it in the right spot. That way when you make a tarball out of the directory, it's not named `Foo.tgz', which only gives you the toplevel name (a real no-no if you're writing, say, HTML::Quux).

    -dlc

Re: Module Building and h2xs
by mitd (Curate) on Nov 02, 2000 at 02:53 UTC
    Oh Bollocks!!

    I just figured it out. Project deadlines and new babies are causing grey matter rot.

    On the off chance that I am not alone in my stupidy, here is the answer.

    h2xs -X -n Foo::Bar Foo/Bar/Bar.pm perl Makefile.pl make (make install) puts everything in its right place Foo/Bar.pm

    Makefile.pl knows all does all! sheesh!

    mitd-Made in the Dark
    'My favourite colour appears to be grey.'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://39517]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2014-07-30 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls