1834019 Members
2940 Online
110063 Solutions
New Discussion

Re: software question

 
subhashni
Regular Advisor

software question

Hi,
I would like to compile and make 5.8.2 expect libraries(perl) on hpux-11.23. What would be the appropriate procedure for this.
Thanks in adavnce.
unix4me
2 REPLIES 2
Raj D.
Honored Contributor

Re: software question

Subhashni,


here is a procedure for building a perl module:


Building a Perl Module
To build a Perl module, you issue four commands from the module directory:
perl Makefile.PL
make
make test
make install

perl Makefile.PL
The first step is to run Makefile.PL to create the makefile. Makefile.PL is a Perl program, but it has no #! line, so you have to invoke the interpreter explicitly.
make
This creates a directory named blib (for Build LIB) in the module directory, and installs the module in it. blib is a private test area for the module. Try doing
.../development/Foo-Bar>ls -R blib/

Pretty amazing, no? If Foo::Bar linked to C code, you'd see those subdirectories populated with .ix files and .al files and .bs files and .so files and maybe a griffin or two. A copy of your .pm file is down there too: it's at
.../development/Foo-Bar/blib/lib/Foo/Bar.pm

make test
This runs t/Foo-Bar.t, with special command line switches that cause Perl to find the copy of your module that is buried under blib/, and not any other copies that might be floating around. This is where you'll see syntax errors flagged, and functional errors if you added your own tests.
make install
This installs your module in /usr/local/lib/perl5/site_perl. On Unix systems, you typically need root access to do this. As soon as it's installed, it's available to everyone on your system.
make dist
If you want to share your module with users on other systems, do a
.../development/Foo-Bar>make dist

This locates all the files listed in MANIFEST, tar's and compresses them, and writes the archive to (for example)
Foo-Bar-1.00.tar.gz

in the development directory. This archive is a complete distribution of your module. You can give it to anyone, and they can build and install your module on their own system.
pm_to_blib
All good makefiles compare the modification times on the source and object files, and only rebuild things that are out of date. Tracking the modification times of all the files under blib/ would be complicated, so the makefile creates a zero-length file named pm_to_blib in the module directory and tracks its modification time instead.
If pm_to_blib gets out of sync with your .pm files, then the makefile will think blib/ is up to date and won't rebuild it. If this happens, just delete pm_to_blib and run make again.


You can check this link further:

http://world.std.com/~swmcd/steven/perl/module_mechanics.html#TOC19


hth and Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: software question

Also check this link for perl make,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=39553&admit=-682735245+1167429038057+28353475

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "