POSIX::1003::Sysconf - POSIX access to sysconf()
use POSIX::1003::Sysconf; # load all names use POSIX::1003::Sysconf qw(sysconf); # keys are strings! $ticks = sysconf('_SC_CLK_TCK'); use POSIX::1003::Sysconf qw(sysconf _SC_CLK_TCK); $ticks = _SC_CLK_TCK; # constants are subs use POSIX::1003::Sysconf '%sysconf'; my $key = $sysconf{_SC_CLK_TCK}; $sysconf{_SC_NEW_KEY} = $key_code; $ticks = sysconf($key); print "$_\n" for keys %sysconf;
The sysconf() interface can be used to query system information in numerical form, where confstr() returns strings.
sysconf()
confstr()
Returns the sysconf value related to the NAMEd constant. The $name must be a string. undef will be returned when the $name is not known by the system.
undef
example:
my $ticks = sysconf('_SC_CLK_TCK') || 1000;
Returns a list with all known names, unsorted.
This exported variable is a tied HASH which maps _SC_* names on unique numbers, to be used with the system's sysconf() function.
_SC_*
The following constants where detected on your system when the module got installed. The second column shows the value which where returned at that time.
During installation, a symbol table will get inserted here.
This module is part of POSIX-1003 distribution version 0.99_07, built on April 08, 2015. Website: http://perl.overmeer.net. The code is based on POSIX, which is released with Perl itself. See also POSIX::Util for additional functionality.
Copyrights 2011-2015 on the perl code and the related documentation by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
To install POSIX::1003, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POSIX::1003
CPAN shell
perl -MCPAN -e shell install POSIX::1003
For more information on module installation, please visit the detailed CPAN module installation guide.