.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "AppConfig::Sys 3" .TH AppConfig::Sys 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME AppConfig::Sys \- Perl5 module defining platform\-specific information and methods for other AppConfig::* modules. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use AppConfig::Sys; \& my $sys = AppConfig::Sys\->new(); \& \& @fields = $sys\->getpwuid($userid); \& @fields = $sys\->getpwnam($username); .Ve .SH OVERVIEW .IX Header "OVERVIEW" AppConfig::Sys is a Perl5 module provides platform-specific information and operations as required by other AppConfig::* modules. .PP AppConfig::Sys is distributed as part of the AppConfig bundle. .SH DESCRIPTION .IX Header "DESCRIPTION" .SS "USING THE AppConfig::Sys MODULE" .IX Subsection "USING THE AppConfig::Sys MODULE" To import and use the AppConfig::Sys module the following line should appear in your Perl script: .PP .Vb 1 \& use AppConfig::Sys; .Ve .PP AppConfig::Sys is implemented using object-oriented methods. A new AppConfig::Sys object is created and initialised using the AppConfig::Sys\->\fBnew()\fR method. This returns a reference to a new AppConfig::Sys object. .PP .Vb 1 \& my $sys = AppConfig::Sys\->new(); .Ve .PP This will attempt to detect your operating system and create a reference to a new AppConfig::Sys object that is applicable to your platform. You may explicitly specify an operating system name to override this automatic detection: .PP .Vb 1 \& $unix_sys = AppConfig::Sys\->new("Unix"); .Ve .PP Alternatively, the package variable \f(CW$AppConfig::Sys::OS\fR can be set to an operating system name. The valid operating system names are: Win32, VMS, Mac, OS2 and Unix. They are not case-specific. .SS "AppConfig::Sys METHODS" .IX Subsection "AppConfig::Sys METHODS" AppConfig::Sys defines the following methods: .IP \fBgetpwnam()\fR 4 .IX Item "getpwnam()" Calls the system function \fBgetpwnam()\fR if available and returns the result. Returns undef if not available. The \fBcan_getpwnam()\fR method can be called to determine if this function is available. .IP \fBgetpwuid()\fR 4 .IX Item "getpwuid()" Calls the system function \fBgetpwuid()\fR if available and returns the result. Returns undef if not available. The \fBcan_getpwuid()\fR method can be called to determine if this function is available. .SH AUTHOR .IX Header "AUTHOR" Andy Wardley, .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 1997\-2007 Andy Wardley. All Rights Reserved. .PP Copyright (C) 1997,1998 Canon Research Centre Europe Ltd. .PP This module is free software; you can redistribute it and/or modify it under the term of the Perl Artistic License. .SH "SEE ALSO" .IX Header "SEE ALSO" AppConfig, AppConfig::File