Index: trunk/psconfig/psconfig.sh
===================================================================
--- trunk/psconfig/psconfig.sh	(revision 6875)
+++ trunk/psconfig/psconfig.sh	(revision 8867)
@@ -52,4 +52,5 @@
 if ($?LD_LIBRARY_PATH == 0) setenv LD_LIBRARY_PATH
 if ($?PKG_CONFIG_PATH == 0) setenv PKG_CONFIG_PATH
+if ($?PERL5LIB == 0) setenv LD_LIBRARY_PATH
 
 # identify system architecture
@@ -156,4 +157,30 @@
 endif 
 
+set plibdir  = {$PSCONFDIR}/{$PSCONFIG}/lib
+set newpath = ""
+set pathlist = `echo $PERL5LIB | tr ':' '\n'`
+foreach name ($pathlist)
+  echo $name | grep $PSCONFDIR > /dev/null
+  if ($status == 0) continue
+  if ($newpath == "") then
+    set newpath = {$name}:
+  else
+    set newpath = {$newpath}{$name}:
+  endif
+end
+if ("$PSCONFIG" == "none") then
+  if ("$newpath" == "") then
+    unsetenv PERL5LIB
+  else
+    setenv PERL5LIB {$newpath}
+  endif 
+else
+  if ("$newpath" == "") then
+    setenv PERL5LIB {$plibdir}:
+  else
+    setenv PERL5LIB {$plibdir}:{$newpath}
+  endif 
+endif 
+
 set newpath = ""
 set pathlist = `echo $PKG_CONFIG_PATH | tr ':' '\n'`
@@ -184,6 +211,8 @@
   alias  psconfigure configure
   alias  psautogen autogen.sh
+  alias  psperlbuild perl Build.PL
 else
   alias  psconfigure configure --bindir=$bindir --libdir=$libdir --includedir={$PSCONFDIR}/{$PSCONFIG}/include --sysconfdir={$PSCONFDIR}/{$PSCONFIG}/etc --datadir={$PSCONFDIR}/share --mandir={$PSCONFDIR}/man
   alias  psautogen autogen.sh --bindir=$bindir --libdir=$libdir --includedir={$PSCONFDIR}/{$PSCONFIG}/include --sysconfdir={$PSCONFDIR}/{$PSCONFIG}/etc --datadir={$PSCONFDIR}/share --mandir={$PSCONFDIR}/man
-endif
+  alias  psperlbuild perl Build.PL --install_path script=$bindir --install_path lib=$libdir --install_path bindoc={$PSCONFDIR}/man/man1 --install_path libdoc={$PSCONFDIR}/man/man3
+endif
