Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Need help with ExtUtils::MakeMaker

Reply
Thread Tools

Need help with ExtUtils::MakeMaker

 
 
jill
Guest
Posts: n/a
 
      01-26-2004



I am trying to package a CGI script and associated modules so that
they can be installed using Perl's standard sequence (perl Makefile.PL
&& make && make test && make install).

My installation has some non-standard (although not at all tricky)
features, and I can't figure out how to coax MakeMaker into generating
the right makefile.

(Is it just me, or the documentation for the ExtUtils modules is
far below average for widely used Perl modules? Is there a better
guide to MakeMaker, etc. than the standard documentation. I have
spent many days on this, and I'm about to go nuts. My many posts
on this are a record of my frustration. I have searched *everywhere*
for clarifications on what MakeMaker does, to no avail. The
ExtUtils::ManMaker man page is useless. What is the directory auto
for? What is the file autosplit.ix? Why does MakeMaker generate
the particular directory structure it generates by default? I have
dozens of questions like this, but there's no information anywhere!
What is a developer supposed to do? No wonder managers prefer
Java! But I digress...)

OK, here's the installation structure I'm trying to achieve
(directories are indicated with trailing slashes):

PATH_TO_CGI_DIR/
INSTALL_DIR/
cgi_script.pl
Module_1.pm
Module_1/
Submodule_1.pm (Module_1::Submodule_1 package)
Submodule_2.pm (Module_1::Submodule_2 package)
Module_2.pm
i386-linux/
Module_3.pm
auto/
Module_3/
Module_3.bs
Module_3.so
autosplit.ix
data_dir/
data_file_1
data_file_2
data_subdir_1/
data_file_3

cgi_script.pl uses Module_1, Module_1::Submodule_1, Module_1::Submodule_2,
Module_2, and Module_3 (which is a Perl extension).

The user is supposed to specify the value for PATH_TO_CGI_DIR/INSTALL_DIR,
e.g.:
perl Makefile.PL LIB=${PATH_TO_CGI_DIR}/${INSTALL_DIR}

Could someone be so kind as to tell me what I must put in Makefile.PL
that will result in the above structure?

Many, many thanks!

jill

 
Reply With Quote
 
 
 
 
Sisyphus
Guest
Posts: n/a
 
      01-27-2004
jill wrote:

> (Is it just me, or the documentation for the ExtUtils modules is
> far below average for widely used Perl modules?
>


I also find that much of the documentation is a little too intuitive for
me

> OK, here's the installation structure I'm trying to achieve
> (directories are indicated with trailing slashes):
>
> PATH_TO_CGI_DIR/
> INSTALL_DIR/
> cgi_script.pl
> Module_1.pm
> Module_1/
> Submodule_1.pm (Module_1::Submodule_1 package)
> Submodule_2.pm (Module_1::Submodule_2 package)
> Module_2.pm
> i386-linux/
> Module_3.pm
> auto/
> Module_3/
> Module_3.bs
> Module_3.so
> autosplit.ix


Does Module_3 really need to go into the i386-linux directory ? Module_3
and its compiled '.so' will be found just as well if Module_3 is
placed in the same directory as Module_1 and Module_2. (I'm thinking
that this may be an unnecessary complication, that's all - and that you
can simply let makemaker decide where to put Module_3 without doing
anything special with it. That could mean that Module_3 gets put in the
i386-linux/ directory anyway.)

> data_dir/
> data_file_1
> data_file_2
> data_subdir_1/
> data_file_3
>


> Could someone be so kind as to tell me what I must put in Makefile.PL
> that will result in the above structure?
>


I would certainly have to play around with it to work out an answer - no
doubt you have been doing just that. Actually "play" is hardly the
appropriate word - I imagine it gets fairly tedious.

If you can't get a satisfactory answer here then all I can suggest is
the makemaker mailing list. See http://lists.perl.org .

Cheers,
Rob


--
To reply by email u have to take out the u in kalinaubears.

 
Reply With Quote
 
 
 
 
James Willmore
Guest
Posts: n/a
 
      01-27-2004
On Mon, 26 Jan 2004 17:37:57 +0000, jill wrote:

> I am trying to package a CGI script and associated modules so that
> they can be installed using Perl's standard sequence (perl Makefile.PL
> && make && make test && make install).


<snip>

Use h2xs

This does all of the "nasty" work for you. For example, suppose you want
to create a module called Foo::Bar. If, in a working/temp/whatever
directory, you execute:

h2xs -XAn Foo::Bar

this takes care of creating files for you - to populate with your code.
(Thanks to Randal Schwartz for helping me see the light of modules in his
book "Learning Perl Objects, References, & Modules").

You may also want to look over perltoot, perlboot, perlmod and h2xs.

I don't have any experience with ExtUtils::MakeMaker ... because there are
other tools Perl offers. But, if you *really* want the straight poop on
this module, try posting to comp.lang.perl.modules - which deals with ...
Perl modules

A side note - Java is far more complicated IMHO. Setting the proper
CLASSPATH alone is a task and a half. Perl is much easier to
incorporate packages into your install. But, of course, it's just my
opinion.

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
War is peace. Freedom is slavery. Ketchup is a vegetable.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Help, I am intermediate in Java...need help in follow case ElementX Java 9 10-01-2008 08:02 PM
Help Help. I really need some help with this =?Utf-8?B?Q2hyaXM=?= ASP .Net 3 01-31-2007 09:33 PM
re_---need help Network Adapters!!!! NEED HELP!!!! hedayatniac@gmail.com Computer Support 4 08-13-2006 01:03 AM
Need help! I need to add lead zeros to a textbox Teep ASP .Net 2 06-21-2004 01:04 PM
Please help!!! Need datagrid selection to fill textboxes...Need quick!! TN Bella ASP .Net 1 06-18-2004 01:31 AM



Advertisments