Perlの@INCをコマンドで確認
ターミナルを使用して、MacPortsにApache2と同時にインストールされたPerlの@INCを出力しました。)
$ perl -V
Summary of my perl5 (revision 5 version 26 subversion 3) configuration:
Platform:
osname=darwin
osvers=10.8.0
archname=darwin-thread-multi-2level
uname='darwin snowleopard-legacy.internal.macports.net 10.8.0 darwin kernel version 10.8.0: tue jun 7 16:33:36 pdt 2011; root:xnu-1504.15.3~1release_i386 i386 '
config_args='-des -Dprefix=/opt/local -Dscriptdir=/opt/local/bin -Dvendorprefix=/opt/local -Dusemultiplicity=y -Dusethreads -Duseshrplib -Dcc=/usr/bin/gcc-4.2 -Dman1ext=1pm -Dman3ext=3pm -Dinstallstyle=lib/perl5 -Dman1dir=/opt/local/share/man/man1p -Dman3dir=/opt/local/share/man/man3p -Dsitebin=/opt/local/libexec/perl5.26/sitebin -Dsiteman1dir=/opt/local/share/perl5.26/siteman/man1 -Dsiteman3dir=/opt/local/share/perl5.26/siteman/man3 -Dvendorbin=/opt/local/libexec/perl5.26 -Dvendorman1dir=/opt/local/share/perl5.26/man/man1 -Dvendorman3dir=/opt/local/share/perl5.26/man/man3 -Dpager=/usr/bin/less -sR -Dperlpath=/opt/local/bin/perl5.26 -Dstartperl=#!/opt/local/bin/perl5.26 -Acppflags=-I/opt/local/include -Accflags=-pipe -Os -Alddlflags=-L/opt/local/lib -Wl,-headerpad_max_install_names -Aldflags=-L/opt/local/lib -Wl,-headerpad_max_install_names '
hint=recommended
useposix=true
d_sigaction=define
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler:
cc='/usr/bin/gcc-4.2'
ccflags ='-fno-common -DPERL_DARWIN -mmacosx-version-min=10.6 -pipe -Os -fno-strict-aliasing -fstack-protector -I/opt/local/include -DPERL_USE_SAFE_PUTENV'
optimize='-O3'
cppflags='-I/opt/local/include -fno-common -DPERL_DARWIN -mmacosx-version-min=10.6 -pipe -Os -fno-strict-aliasing -fstack-protector -I/opt/local/include'
ccversion=''
gccversion='4.2.1 (Apple Inc. build 5666) (dot 3)'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='/usr/bin/gcc-4.2'
ldflags =' -mmacosx-version-min=10.6 -L/opt/local/lib -Wl,-headerpad_max_install_names -fstack-protector'
libpth=/opt/local/lib /usr/lib
libs=-lpthread -lgdbm -ldbm -ldl -lm -lutil -lc
perllibs=-lpthread -ldl -lm -lutil -lc
libc=
so=dylib
useshrplib=true
libperl=libperl.dylib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=bundle
d_dlsymun=undef
ccdlflags=' '
cccdlflags=' '
lddlflags=' -mmacosx-version-min=10.6 -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
USE_REENTRANT_API
Built under darwin
Compiled at Dec 29 2018 06:35:16
@INC:
/opt/local/lib/perl5/site_perl/5.26/darwin-thread-multi-2level
/opt/local/lib/perl5/site_perl/5.26
/opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level
/opt/local/lib/perl5/vendor_perl/5.26
/opt/local/lib/perl5/5.26/darwin-thread-multi-2level
/opt/local/lib/perl5/5.26
サンプルコードと出力結果です。ターミナルを起動して、perl -V
のコマンドを入力したらreturnキーを押します。Perlの@INCを確認できました。