The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

POSIX::1003::Sysconf - POSIX access to sysconf()

INHERITANCE

 POSIX::1003::Sysconf
   is a POSIX::1003

SYNOPSIS

  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;

FUNCTIONS

Standard POSIX

sysconf(NAME)

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.

example:

  my $ticks = sysconf('_SC_CLK_TCK') || 1000;

Additional

sysconf_names()

Returns a list with all known names, unsorted.

CONSTANTS

%sysconf

This exported variable is a tied HASH which maps _SC_* names on unique numbers, to be used with the system's sysconf() function.

SEE ALSO

This module is part of POSIX-1003 distribution version 0.03, built on December 22, 2011. Website: http://perl.overmeer.net. The code is based on POSIX, which is released with Perl itself.

COPYRIGHTS

Copyrights of the perl code and the related documentation by 2011 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