home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 July / APC0407D2.iso / workshop / apache / files / ActivePerl-5.6.1.638-MSWin32-x86.msi / _138f938f349b511e2c31c907739bd62d < prev    next >
Encoding:
Text File  |  2004-04-13  |  11.9 KB  |  249 lines

  1. <HTML>
  2.  
  3. <HEAD>
  4. <TITLE>New ActivePerl Directory Structure</TITLE>
  5. <LINK rel="stylesheet" href="../../Active.css" type="text/css">
  6. </HEAD>
  7.  
  8. <BODY bgcolor="FFFFFF">
  9.  
  10.     <!-- beginning of leaf header-->
  11.  
  12. <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
  13.   <TR>
  14.     <TD class="block" valign="MIDDLE" width="100%" bgcolor="#cccccc"><FONT size="+1"><STRONG>
  15.       <P class="block"> ActivePerl Directory Structure</P>
  16.       </STRONG></FONT></TD>
  17.   </TR>
  18.   <TR>
  19.     <TD>
  20.       <P> </P>
  21.       <P><FONT size="7">THIS FILE IS OUT OF DATE!</FONT></P>
  22.       <!-- end of leaf content-->
  23.       <!-- INDEX BEGIN -->
  24.  
  25.       <UL>
  26.         <LI><A href="#New_ActivePerl_Directory_Structu">New ActivePerl Directory Structure</A></LI>
  27.         <UL>
  28.           <LI><A href="#Introduction">Introduction</A></LI>
  29.           <LI><A href="#Potential_Users">Potential Users</A></LI>
  30.           <LI><A href="#The_possibilities">The possibilities</A></LI>
  31.           <LI><A href="#The_New_Directory_Structure">The New Directory Structure</A></LI>
  32.           <LI><A href="#Multiple_Versions_and_Architectu">Multiple Versions and Architectures</A></LI>
  33.           <LI><A href="#Installing_Modules_in_a_Differen">Installing Modules in a Different sitelib</A></LI>
  34.           <LI><A href="#Some_additional_information">Some additional information</A></LI>
  35.           <LI><A href="#Conclusion">Conclusion</A></LI>
  36.         </UL>
  37.       </UL>
  38.       <!-- INDEX END -->
  39.  
  40.       <HR>
  41.       <P> 
  42.       <H1><A name="New_ActivePerl_Directory_Structu">New ActivePerl Directory Structure</A></H1>
  43.       <P> 
  44.       <HR>
  45.       <H2><A name="Introduction">Introduction</A></H2>
  46.       <P>This document describes the new ActivePerl directory structure, and how to use it, and how
  47.       to maniuplate @INC, to make it work better for you.</P>
  48.       <P>ActiveState has received numerous comments and requests concerning the directory structure
  49.       of ActivePerl. With the newly designed installation directory structure and building of @INC,
  50.       we worked on addressing the following issues:</P>
  51.       <UL>
  52.         <LI>Allow for installation of multiple simultaneous versions</LI>
  53.         <LI>Allow for installation of multiple architectures, such as perl OBJECT and perl THREAD</LI>
  54.         <LI>Preserve the site libraries among installations</LI>
  55.         <LI>Allow for networked installations with shared lib and site directories</LI>
  56.         <LI>Allow for easy upgrading of ActivePerl releases</LI>
  57.       </UL>
  58.       <HR>
  59.       <H2><A name="Potential_Users">Potential Users</A></H2>
  60.       <P>In determining our options we have tried to consider the position of the following groups
  61.       of users:</P>
  62.       <UL>
  63.         <LI>Web Developers</LI>
  64.         <LI>Small-site System Administrators</LI>
  65.         <LI>Module/Extension Developers</LI>
  66.         <LI>Perl Developers</LI>
  67.         <LI>Large-site System Administrators / Enterprise Admins</LI>
  68.       </UL>
  69.       <HR>
  70.       <H2><A name="The_possibilities">The possibilities</A></H2>
  71.       <P>The following possibilities were considered:</P>
  72.       <UL>
  73.         <LI>The core gets installed into a version, subversion, patch specific sub directory of the
  74.           perl root</LI>
  75.         <LI>The core gets installed into a version and subversion specific sub directory of the perl
  76.           root</LI>
  77.         <LI>The core gets installed into any directory the user desires</LI>
  78.         <LI>Perl executables are subdivided into architecture and non-architecture dependent
  79.           directories</LI>
  80.         <LI>Perl executables are all installed in the same directory</LI>
  81.         <LI>sitelib is installed at the same level as lib or as a subdirectory of lib</LI>
  82.         <LI>sitelib is installed outside or at a level above lib</LI>
  83.         <LI>sitelib has version, subversion, patch specific sub directory</LI>
  84.         <LI>sitelib has version, subversion specific sub directory</LI>
  85.         <LI>sitelib has no version specific directories in the path</LI>
  86.       </UL>
  87.       <P>Essentially these options are all the same. What it means for you is, "Where do you
  88.       want to install?"</P>
  89.       <P><STRONG>Our solution supports all of these configurations.</STRONG></P>
  90.       <P> 
  91.       <HR>
  92.       <H2><A name="The_New_Directory_Structure">The New Directory Structure</A></H2>
  93.       <P>With earlier builds, we followed the core directory structure which gave us directories
  94.       such as c:\perl\5.00502\bin\mswin32-x86-object. This is good for people who have a need for
  95.       multiple versions or types of perl installed at a time. We quickly found that the Win32 public
  96.       didn't like this at all, except for a rare few who actually used and needed this. People
  97.       decided they wanted a plain old c:\perl\bin\perl.exe just like they were used to, fewer
  98.       characters in their PATH, site libraries that were in a directory not dependent on a version,
  99.       and architecture depended libraries worked in with the regular libraries where they could find
  100.       them. As a result, we have simplified the directory structure significantly.</P>
  101.       <P>We are now using the following default directory structure:</P>
  102.       <PRE> c:\perl
  103.     bin                     ... all perl binaries and util scripts
  104.     lib                     ... core modules
  105.     site
  106.        lib                  ... default site modules location
  107. </PRE>
  108.       <P>This is like what people are accustomed to from previous versions of Perl for Win32 and
  109.       from the GSAR port of 5.004. However, if more explicit directory names are called for, you can
  110.       still implement them as described below. If you are new to perl, or don't need anything more
  111.       complicated than this, then just installing using ``c:\perl'' (or ``d:\perl'' for you NT
  112.       multibooters) is simplified and things are where you have asked for them to be.</P>
  113.       <P> 
  114.       <HR>
  115.       <H2><A name="Multiple_Versions_and_Architectu">Multiple Versions and Architectures</A></H2>
  116.       <P>On the other hand, you can still support the versioned installs like 500-502 were, to
  117.       support multiple simultaneous versions. If you want multiple Perl versions installed you can
  118.       change 'c:\perl' to 'c:\perl\whatever' when you install.</P>
  119.       <P><STRONG>Installation 1:</STRONG></P>
  120.       <PRE>    c:\perl\
  121.         bin                                 ... all perl binaries and util scripts
  122.         lib                                 ... core modules
  123.         site
  124.            lib                              ... default site modules location
  125. </PRE>
  126.       <P><STRONG>Installation 2:</STRONG></P>
  127.       <PRE>    c:\perl\
  128.        site 
  129.            lib                              ... default site modules location
  130.        5.00501-thread
  131.            bin                              ... all perl binaries and util scripts
  132.            lib                              ... core modules
  133. </PRE>
  134.       <P><STRONG>Shared site:</STRONG></P>
  135.       <PRE>    c:\perl
  136.         site
  137.            lib                              ... global site modules location
  138.         5.005
  139.            bin
  140.            lib
  141.         5.00501
  142.            bin
  143.            lib
  144.         5.00501-thread
  145.            bin
  146.            lib
  147. </PRE>
  148.       <P>The ActivePerl installer recognizes if you are installing in a
  149.       <version>.<sub-version>* specific directory, and automatically moves site up a
  150.       level so that you can share your site libraries between versions. If you want to change this
  151.       default location, you have to set the following system registry values:</P>
  152.       <PRE>    \\HKLM\Software\Perl
  153.         lib-5.005=c:\perl\site\lib
  154. </PRE>
  155.       <BR>
  156.       <PRE>    \\HKLM\Software\Perl
  157.         lib-5.00501=c:\perl\site\lib
  158. </PRE>
  159.       <BR>
  160.       <P>or set PERL5LIB in your environment.</P>
  161.       <P>You can use this method to reset your perl system to use a site directory shared across a
  162.       network for multiple workstations.</P>
  163.       <HR>
  164.       <H2><A name="Installing_Modules_in_a_Differen">Installing Modules in a Different sitelib</A></H2>
  165.       <P>If you want PPM to install into a different site lib, you need to set the following values
  166.       in 'Config.pm':</P>
  167.       <PRE>    installsitelib='c:\Perl\site\lib'
  168.     installarchlib='c:\Perl\site\lib\arch' (if using arch-specific dir)
  169. </PRE>
  170.       <P>If you don't use PPM, which you may well not if you are a module developer, you can pass
  171.       the LIB parameter to 'perl makefile.pl LIB=c:\perl\site\lib'.</P>
  172.       <HR>
  173.       <H2><A name="Some_additional_information">Some additional information</A></H2>
  174.       <P>Additional suggestions have been submitted regarding the architecture specific directory
  175.       for binaries in the core tree. Most people would like to see everything go into 'c:\perl\bin'.</P>
  176.       <P>The default directory structure for an ActivePerl installation is as follows</P>
  177.       <PRE>    c:\perl
  178.        bin
  179.        lib
  180.        site
  181.          lib
  182. </PRE>
  183.       <P>If you install ActivePerl into a directory such as 'c:\perl\5.005', the directory structure
  184.       will be as follows</P>
  185.       <PRE>    c:\perl
  186.        5.005
  187.          bin
  188.          lib
  189.        site
  190.          lib
  191. </PRE>
  192.       <P><CODE>@INC</CODE> can be configured by modifying the following values:</P>
  193.       <PRE>    PERLLIB environment variable
  194.     PERL5LIB environment variable
  195.     \\HKLM\Software\Perl\lib-<version>
  196.     \\HKLM\Software\Perl\sitelib-<version>
  197.     \\HKLM\Software\Perl\lib
  198.     \\HKLM\Software\Perl\sitelib
  199. </PRE>
  200.       <P>In the algorithm for building <CODE>@INC</CODE> we define the following values:</P>
  201.       <UL>
  202.         <LI><CODE>$Reg_Lib_Version</CODE> = the actual value of \\HKLM\Software\Perl\lib-{$]}</LI>
  203.         <LI><CODE>$Reg_Site_Version</CODE> = the actual value of \\HKLM\Software\Perl\sitelib-{$]}</LI>
  204.         <LI><CODE>$Reg_Lib</CODE> = the actual value of \\HKLM\Software\Perl\lib</LI>
  205.         <LI><CODE>$Reg_Site</CODE> = the actual value of \\HKLM\Software\Perl\sitelib</LI>
  206.         <LI><CODE>$Perl_Dir</CODE> = the directory into which Perl was installed and contains 'bin'
  207.           and 'lib' directories</LI>
  208.         <LI><CODE>$Arch</CODE> = Perl architecture ex. 'MSWin32-x86-object', 'MSWin32-ALPHA-object'</LI>
  209.         <LI>$] = the Perl variable containing Perl's version, sub-version and patch level</LI>
  210.         <LI><CODE>$Perl_Version</CODE> = Complete Perl <version>.<sub-version> with no
  211.           patch level, for example: <CODE>$Perl_Version</CODE> == 5.005 for Perl 5.005_02</LI>
  212.       </UL>
  213.       <P>The algorithm for building <CODE>@INC</CODE> is as follows (this shows precedence):</P>
  214.       <PRE>    # This gets rid of a version in the path if one exists
  215.     ($Perl_Site) = ($Perl_Dir =~ /(.*?)(?:[\/\\]$Perl_Version.*)?$/);
  216.     $Perl_Site .= '/site';
  217. </PRE>
  218.       <BR>
  219.       <PRE>    push @INC, split /;/, ($ENV{PERL5LIB} || $ENV{PERLLIB});
  220.     push @INC, split /;/, ($Reg_Lib_Version || $Reg_Lib);
  221.     push @INC, ("$Perl_Dir/lib/$Arch", "$Perl_Dir/lib);
  222.     push @INC, ("$Perl_Site/$]/lib/$Arch", "$Perl_Site/$]/lib");
  223.     push @INC, split /;/, ($Reg_Site_Version || $Reg_Site);
  224.     push @INC, ("$Perl_Site/lib/$Arch", "$Perl_Site/lib");
  225.     push @INC, '.';
  226. </PRE>
  227.       <P>Of course if a directory does not exist it does not get added to @INC.</P>
  228.       <HR>
  229.       <H2><A name="Conclusion">Conclusion</A></H2>
  230.       <P>We hope that this simplified directory structure, and the ability to easily reconfigure the
  231.       installation locations, greatly improves your ability to use ActivePerl to the fullest. Enjoy!</P>
  232.       <P>We welcome comments and suggestions.</P>
  233.  
  234.  
  235.       <!-- beginning of leaf footer-->
  236.       <P> </P>
  237.     </TD>
  238.   <TR>
  239.     <TD class="block" valign="MIDDLE" width="100%" bgcolor="#cccccc"><FONT size="+1"><STRONG>
  240.       <P class="block"> ActivePerl Directory Structure</P>
  241.       </STRONG></FONT></TD>
  242.   </TR>
  243. </TABLE>
  244. <!-- end of leaf footer-->
  245.  
  246. </BODY>
  247.  
  248. </HTML>
  249.