1AppConfig::Sys(3) User Contributed Perl Documentation AppConfig::Sys(3)
2
3
4
6 AppConfig::Sys - Perl5 module defining platform-specific information
7 and methods for other AppConfig::* modules.
8
10 use AppConfig::Sys;
11 my $sys = AppConfig::Sys->new();
12
13 @fields = $sys->getpwuid($userid);
14 @fields = $sys->getpwnam($username);
15
17 AppConfig::Sys is a Perl5 module provides platform-specific information
18 and operations as required by other AppConfig::* modules.
19
20 AppConfig::Sys is distributed as part of the AppConfig bundle.
21
23 USING THE AppConfig::Sys MODULE
24
25 To import and use the AppConfig::Sys module the following line should
26 appear in your Perl script:
27
28 use AppConfig::Sys;
29
30 AppConfig::Sys is implemented using object-oriented methods. A new
31 AppConfig::Sys object is created and initialised using the AppCon‐
32 fig::Sys->new() method. This returns a reference to a new AppCon‐
33 fig::Sys object.
34
35 my $sys = AppConfig::Sys->new();
36
37 This will attempt to detect your operating system and create a refer‐
38 ence to a new AppConfig::Sys object that is applicable to your plat‐
39 form. You may explicitly specify an operating system name to override
40 this automatic detection:
41
42 $unix_sys = AppConfig::Sys->new("Unix");
43
44 Alternatively, the package variable $AppConfig::Sys::OS can be set to
45 an operating system name. The valid operating system names are: Win32,
46 VMS, Mac, OS2 and Unix. They are not case-specific.
47
48 AppConfig::Sys METHODS
49
50 AppConfig::Sys defines the following methods:
51
52 getpwnam()
53 Calls the system function getpwnam() if available and returns the
54 result. Returns undef if not available. The can_getpwnam() method
55 can be called to determine if this function is available.
56
57 getpwuid()
58 Calls the system function getpwuid() if available and returns the
59 result. Returns undef if not available. The can_getpwuid() method
60 can be called to determine if this function is available.
61
62 *
63
65 Andy Wardley, <abw@wardley.org>
66
68 $Revision: 1.61 $
69
71 Copyright (C) 1997-2004 Andy Wardley. All Rights Reserved.
72
73 Copyright (C) 1997,1998 Canon Research Centre Europe Ltd.
74
75 This module is free software; you can redistribute it and/or modify it
76 under the term of the Perl Artistic License.
77
79 AppConfig, AppConfig::File
80
81
82
83perl v5.8.8 2007-01-02 AppConfig::Sys(3)