home *** CD-ROM | disk | FTP | other *** search
/ Freelog 15 / FREELOG 15.ISO / WebMaster / Perl / PERL5106.ZIP / perl5 / Lib / Win32 / ipc.pm < prev    next >
Encoding:
Perl POD Document  |  1996-01-17  |  1.6 KB  |  66 lines

  1. package Win32::IPC;
  2.  
  3. =head1 NAME
  4.  
  5. Win32::IPC - Support module for Semaphores, Mutexes,Process
  6. and ChangeNotification Synchronization
  7.  
  8. =head1 SYNOPSIS
  9.  
  10.     use Win32::Process;
  11.     #Create objects.
  12.     
  13.     Win32::Process::WaitForMultipleObjects(@ListOfObjects,$WaitAll,$Timeout);
  14.  
  15. =head1 DESCRIPTION
  16.  
  17. This module is loaded by any of the IPC supporting modules. (listed above).
  18. It supplies the WaitForMultipleObjects call to those objects.
  19.  
  20. =cut
  21.  
  22. require Exporter;
  23. require DynaLoader;
  24. require AutoLoader;
  25.  
  26. @ISA = qw(Exporter DynaLoader);
  27. # Items to export into callers namespace by default. Note: do not export
  28. # names by default without a very good reason. Use EXPORT_OK instead.
  29. # Do not simply export all your public functions/methods/constants.
  30. @EXPORT = qw(
  31.     INFINITE
  32.     WaitForMultipleObjects
  33. );
  34.  
  35. sub AUTOLOAD {
  36.     # This AUTOLOAD is used to 'autoload' constants from the constant()
  37.     # XS function.  If a constant is not found then control is passed
  38.     # to the AUTOLOAD in AutoLoader.
  39.  
  40.     local($constname);
  41.     ($constname = $AUTOLOAD) =~ s/.*:://;
  42.     $val = constant($constname, @_ ? $_[0] : 0);
  43.     if ($! != 0) {
  44.     if ($! =~ /Invalid/) {
  45.         $AutoLoader::AUTOLOAD = $AUTOLOAD;
  46.         goto &AutoLoader::AUTOLOAD;
  47.     }
  48.     else {
  49.         ($pack,$file,$line) = caller;
  50.         die "Your vendor has not defined I macro $constname, used at $file line $line.
  51. ";
  52.     }
  53.     }
  54.     eval "sub $AUTOLOAD { $val }";
  55.     goto &$AUTOLOAD;
  56. }
  57.  
  58. bootstrap Win32::IPC;
  59.  
  60. # Preloaded methods go here.
  61.  
  62. # Autoload methods go after __END__, and are processed by the autosplit program.
  63.  
  64. 1;
  65. __END__
  66.