On Thursday 24 June 2004 11:09 pm, lfm wrote: > thank u > > Beau > > but i am stilled puzzled . > > since it is a script language ,why not we write the *.pm directly and put > to the lib directory(or other place) . > > I opened the *.pm and found there are only text . > > so ,why we build ? > > asp need build too? > > the really reason that cause me to ask the question is i failed on some > perl module building on the linux > > I am install bugzilla on linux now!
Well, I can think of several reasons that we use the perl Makefile.PL, ... module install cycle: 1. Some modules contain c ( and/or c++ ) source files. The install cycle automatically handles the compiling and linking of those sources and places them in the perl module tree correctly in whatever library format is expected by the target machine (shared library, windows dll, etc.) The standard install performs the cross- platform manipulations much as the 'nix 'automake' utilities do - but supports many more platforms. 2. Even if a module is in pure-perl, the module developers support the use of the standard install because it, again, puts the modules in their correct places in the perl module tree across all platforms. 3. If everyone uses the standard install - which has been tested and validated for years - that's one less source of problems for module users to bug module developers about. If you insist to 'manually' install a module, it can, of course, be done, but you must understand the structure of you module tree ( as shown in the @INC array - try perl -V to look at yours. ) You have another other option - use lib. In a nutshell: Suppose you want to 'use Fuzzy::Wuzzy;'. If it is a simple module with one .pm file, that file will be 'Wuzzy.pm'. Download the .pm file and place it somewhere like: /---your working directory--/lib/Fuzzy/Wuzzy.pm Now in your perl script, say this: ... use lib 'lib'; use Fuzzy::Wuzzy; ... The module should be found. But don't you see that this is more painful that just doing the standard install? Fuzzy::Wuzzy will only be available from that working directory; if you move your script, you better move Fuzzy::Wuzzy too, and maybe change your use lib statement. I really don't understand your problem with the standard install; is it that you don't have permissions for the perl tree? If you explain more fully, we can help. Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>