home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / OS.pm < prev    next >
Encoding:
Perl POD Document  |  2004-09-23  |  2.1 KB  |  134 lines

  1. # /*
  2. #  * *********** WARNING **************
  3. #  * This file generated by ModPerl::WrapXS/0.01
  4. #  * Any changes made here will be lost
  5. #  * ***********************************
  6. #  * 01: lib/ModPerl/Code.pm:701
  7. #  * 02: O:\147xampp\sources\mod_perl-1.99_16\blib\lib/ModPerl/WrapXS.pm:584
  8. #  * 03: O:\147xampp\sources\mod_perl-1.99_16\blib\lib/ModPerl/WrapXS.pm:1100
  9. #  * 04: Makefile.PL:335
  10. #  * 05: Makefile.PL:283
  11. #  * 06: Makefile.PL:51
  12. #  */
  13.  
  14.  
  15. package APR::OS;
  16.  
  17. use strict;
  18. use warnings FATAL => 'all';
  19.  
  20.  
  21. use APR ();
  22. use APR::XSLoader ();
  23. our $VERSION = '0.01';
  24. APR::XSLoader::load __PACKAGE__;
  25.  
  26.  
  27.  
  28. 1;
  29. __END__
  30.  
  31. =head1 NAME
  32.  
  33. APR::OS - Perl API for Platform-specific APR API
  34.  
  35.  
  36.  
  37.  
  38. =head1 Synopsis
  39.  
  40.   use APR::OS ();
  41.   
  42.   # get thread id
  43.   my $tid_obj = APR::OS::thread_current();
  44.   my $tid = $$tid_obj;
  45.  
  46.  
  47.  
  48.  
  49.  
  50. =head1 Description
  51.  
  52. C<APR::OS> provides the Perl interface to platform-specific APR API.
  53.  
  54. You should be extremely careful when relying on any of the API
  55. provided by this module, since they are no portable. So if you use
  56. those you application will be non-portable as well.
  57.  
  58.  
  59.  
  60.  
  61. =head1 API
  62.  
  63. C<APR::OS> provides the following methods:
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. =head2 C<thread_current>
  75.  
  76. Get the thread ID
  77.  
  78.   $tid_obj = APR::OS::thread_current();
  79.  
  80. =over 4
  81.  
  82. =item ret: C<$tid_obj> ( C<APR::OS::Thread> object )
  83.  
  84. To get the thread id dereference it: C<$$tid_obj>.
  85.  
  86. That value is a thread ID under threaded MPMs, otherwise 0.
  87.  
  88. =item since: 1.99_12
  89.  
  90. =back
  91.  
  92. Example:
  93.  
  94.     use Apache::MPM ();
  95.     use APR::OS ();
  96.     if (Apache::MPM->is_threaded) {
  97.         my $tid_obj = APR::OS::thread_current();
  98.         print "TID: $$tid_obj";
  99.     }
  100.     else {
  101.         print "PID: $$";
  102.     }
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110. =head1 See Also
  111.  
  112. L<mod_perl 2.0 documentation|docs::2.0::index>.
  113.  
  114.  
  115.  
  116.  
  117. =head1 Copyright
  118.  
  119. mod_perl 2.0 and its core modules are copyrighted under
  120. The Apache Software License, Version 2.0.
  121.  
  122.  
  123.  
  124.  
  125. =head1 Authors
  126.  
  127. L<The mod_perl development team and numerous
  128. contributors|about::contributors::people>.
  129.  
  130. =cut
  131.  
  132.