home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _dba7089f1bcf8ba8d3faafb678f04adf < prev    next >
Encoding:
Text File  |  2004-06-01  |  1.7 KB  |  75 lines

  1. package Win32::AuthenticateUser;
  2.  
  3. use strict;
  4. use Carp;
  5. use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
  6.  
  7. require Exporter;
  8. require DynaLoader;
  9. require AutoLoader;
  10.  
  11. @ISA = qw(Exporter DynaLoader);
  12. # Items to export into callers namespace by default. Note: do not export
  13. # names by default without a very good reason. Use EXPORT_OK instead.
  14. # Do not simply export all your public functions/methods/constants.
  15. @EXPORT = qw(AuthenticateUser);
  16.  
  17. $VERSION = '0.02';
  18.  
  19. sub AUTOLOAD {
  20.     # This AUTOLOAD is used to 'autoload' constants from the constant()
  21.     # XS function.  If a constant is not found then control is passed
  22.     # to the AUTOLOAD in AutoLoader.
  23.  
  24.     my $constname;
  25.     ($constname = $AUTOLOAD) =~ s/.*:://;
  26.     croak "& not defined" if $constname eq 'constant';
  27.     my $val = constant($constname, @_ ? $_[0] : 0);
  28.     if ($! != 0) {
  29.     if ($! =~ /Invalid/) {
  30.         $AutoLoader::AUTOLOAD = $AUTOLOAD;
  31.         goto &AutoLoader::AUTOLOAD;
  32.     }
  33.     else {
  34.         croak "Your vendor has not defined Win32::AuthenticateUser macro $constname";
  35.     }
  36.     }
  37.     no strict 'refs';
  38.     *$AUTOLOAD = sub () { $val };
  39.     goto &$AUTOLOAD;
  40. }
  41.  
  42. bootstrap Win32::AuthenticateUser $VERSION;
  43.  
  44. 1;
  45. __END__
  46.  
  47. =head1 NAME
  48.  
  49. Win32::AuthenticateUser - Win32 User authentication for domains
  50.  
  51. =head1 SUPPORTED PLATFORMS
  52.  
  53. none
  54.  
  55. =head1 SYNOPSIS
  56.  
  57.   use Win32::AuthenticateUser;
  58.   
  59.   AuthenticateUser("domain", "user", "passwd");
  60.  
  61. =head1 DESCRIPTION
  62.  
  63. Performs Win32 user authentication using domains
  64.  
  65. =head1 STATUS
  66.  
  67. This module is incomplete and is not being actively developed.
  68. No documentation exists (yet), and there may be bugs in the code.
  69.  
  70. =head1 AUTHOR
  71.  
  72. Murray Nesbitt, ActiveState Tool Corp.
  73.  
  74. =cut
  75.