home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl501m.zip / lib / OS2 / UPM.pm < prev   
Encoding:
Perl POD Document  |  1995-05-13  |  1.9 KB  |  99 lines

  1. package OS2::UPM;
  2.  
  3. require Exporter;
  4. require AutoLoader;
  5. require DynaLoader;
  6. @ISA = qw(Exporter AutoLoader DynaLoader);
  7. # Items to export into callers namespace by default
  8. # (move infrequently used names to @EXPORT_OK below)
  9. @EXPORT = qw(
  10.     UPM_ACTIVE
  11.     UPM_ADMIN
  12.     UPM_ALL
  13.     UPM_BAD_AUTHCHECK
  14.     UPM_BAD_PARAMETER
  15.     UPM_BAD_TYPE
  16.     UPM_CONFIG
  17.     UPM_DNODE
  18.     UPM_DOMAIN
  19.     UPM_DOMAIN_MAX_FORCE
  20.     UPM_DOMAIN_VERBOSE
  21.     UPM_DUP_ULP_ENTRY
  22.     UPM_ERROR_MORE_DATA
  23.     UPM_ERROR_NONVAL_LOGON
  24.     UPM_FAIL_SECURITY
  25.     UPM_FL_DOMVER
  26.     UPM_FL_LOCVER
  27.     UPM_FL_NOVER
  28.     UPM_LOCAL
  29.     UPM_LOCAL_HPFS
  30.     UPM_LOGGED
  31.     UPM_LOGGED_ELSEWHERE
  32.     UPM_LOG_CANCEL
  33.     UPM_LOG_FILE_NOT_FOUND
  34.     UPM_LOG_INPROC
  35.     UPM_MAX_ENT_EXCEEDED
  36.     UPM_MAX_ULP_EXCEEDED
  37.     UPM_NODISK
  38.     UPM_NOMEM
  39.     UPM_NOT_LOGGED
  40.     UPM_OK
  41.     UPM_OPEN_SESSIONS
  42.     UPM_PASSWORD_EXP
  43.     UPM_PRIV_ADMIN
  44.     UPM_PRIV_LOCAL_ADMIN
  45.     UPM_PRIV_USER
  46.     UPM_PROF_NOT_FOUND
  47.     UPM_PWDLEN
  48.     UPM_REMLEN
  49.     UPM_SS_BUSY
  50.     UPM_SS_DEAD
  51.     UPM_SS_PWDEXPWARNING
  52.     UPM_SYS_ERROR
  53.     UPM_UIDLEN
  54.     UPM_ULP_LOADED
  55.     UPM_UNAVAIL
  56.     UPM_USER
  57. );
  58. # Other items we are prepared to export if requested
  59. @EXPORT_OK = qw(
  60.     local_user
  61.     user_list
  62.     local_logon
  63.     logon
  64.     logoff
  65.     logon_user
  66.     logoff_user
  67. );
  68.  
  69. sub AUTOLOAD {
  70.     if (@_ > 1) {
  71.     $AutoLoader::AUTOLOAD = $AUTOLOAD;
  72.     goto &AutoLoader::AUTOLOAD;
  73.     }
  74.     local($constname);
  75.     ($constname = $AUTOLOAD) =~ s/.*:://;
  76.     $val = constant($constname, @_ ? $_[0] : 0);
  77.     if ($! != 0) {
  78.     if ($! =~ /Invalid/) {
  79.         $AutoLoader::AUTOLOAD = $AUTOLOAD;
  80.         goto &AutoLoader::AUTOLOAD;
  81.     }
  82.     else {
  83.         ($pack,$file,$line) = caller;
  84.         die "Your vendor has not defined UPM macro $constname, used at $file line $line.
  85. ";
  86.     }
  87.     }
  88.     eval "sub $AUTOLOAD { $val }";
  89.     goto &$AUTOLOAD;
  90. }
  91.  
  92. bootstrap OS2::UPM;
  93.  
  94. # Preloaded methods go here.  Autoload methods go after __END__, and are
  95. # processed by the autosplit program.
  96.  
  97. 1;
  98. __END__
  99.