Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

h2xs again

by chorg (Monk)
on Dec 12, 2000 at 01:54 UTC ( #46150=perlquestion: print w/ replies, xml ) Need Help??
chorg has asked for the wisdom of the Perl Monks concerning the following question:

So I'm using h2xs to set up a proper environment for writing modules , a thing I am fairly new at, I might add. I run

h2xs -AXn Client::Graph

and get the directory Client/Graph etc. However, when I modify the file Client/Graph/Graph.pm, I can't use it. What I have to do is move it up a directory. I know that that's how it should work, but is there a way to do that automatically?
_______________________________________________
"Intelligence is a tool used achieve goals, however goals are not always chosen wisely..."

Comment on h2xs again
Download Code
Re: h2xs again
by dchetlin (Friar) on Dec 12, 2000 at 02:07 UTC
    Actually, MakeMaker will make it just work. Just cd into Client/Graph, do your perl Makefile.PL, make, make test, and make install, and it will be in the correct directory such that you can `use Client::Graph'.

    If your problem is that you can't use it from the build directory, look at the way the autogenerated test.pl uses it, and copy that. In fact, why not just put the code into the test.pl. You are writing unit tests, right?

    Finally: when you go to package up your distribution, rename the Client directory Client-Graph and then tar it up. That's the style most modules on the CPAN use.

    -dlc

      Finally: when you go to package up your distribution, rename the Client directory Client-Graph and then tar it up. That's the style most modules on the CPAN use.

      No. Don't do that. Do: make dist

      Christian Lemburg
      Brainbench MVP for Perl
      http://www.brainbench.com

Re: h2xs again
by clemburg (Curate) on Dec 12, 2000 at 15:06 UTC

    Read Effective Perl Programming, pages 177 to 195, chapter "Writing Packages and Modules".

    Christian Lemburg
    Brainbench MVP for Perl
    http://www.brainbench.com

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-09-23 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (241 votes), past polls