Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










32.7. Config



use Config;
if ($Config{cc} =~ /gcc/) {
print "This perl was built by GNU C.\n";
}
use Config qw(myconfig config_sh config_vars);
print myconfig(); # like perl -V without a pattern
print config_sh(); # gives absolutely everything
config_vars qw/osname osvers archname/;


The configuration mechanism that builds and installs Perl assembles a
wealth of information about your system. The
Config module exports by default a tied hash
variable named %Config, which provides access to
over 900 different configuration values. (These values are also
available through Perl's
-V:PATTERN command-line switch.)
Config also provides three functions that give more
shell-like access to these values, as shown above. For instance, that
last call might print out:

osname='openbsd';
osvers='2.6';
archname='OpenBSD.sparc-openbsd';


The module's online documentation describes the configuration
variables and their possible values. Be aware that if you move your
perl executable to a system other than the one on
which it was built, these values may not reflect the current reality;
for instance, if you're running a Linux or a Solaris binary on a BSD
system.






/ 875