【问题标题】:perl INC contentperl INC 内容
【发布时间】:2014-04-28 20:33:29
【问题描述】:

我是 Perl 的新手。
需要帮助来找出 perl 从特定位置加载库的原因 (@INC)。
执行以下命令给了我:

$ perl -V
Summary of my perl5 (revision 5 version 10 subversion 1) configuration:

  Platform:
    osname=linux, osvers=2.6.9-68.9.elsmp, archname=x86_64-linux
    uname='linux xxxxxx01 2.6.9-68.9.elsmp #1 smp tue jan 29 09:49:28 est 2008 x86_64 x86_64 x86_64 gnulinux '
    **config_args='-de -Dprefix=/home/..../perl_5.10.1'**
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef

config_args 的具体指定时间和方​​式。
是在这台主机上安装 perl 期间吗?
感谢您的帮助。

【问题讨论】:

  • config_args 包含传递给Configure 的参数,该程序用于生成用于构建Perl 的make 文件。

标签: perl perl-module


【解决方案1】:

它是在配置 perl 时设置的——也就是说,在 perl 可执行文件甚至编译之前。这个默认的@INC 路径已经编译到您的 perl 副本中;除非您重新编译 perl,否则它将始终是您 perl 的默认 @INC 的一部分。

您仍然可以在运行时更改@INC。它只是一个普通的旧数组,您可以使用标准数组操作(如 shiftpushpopsplice 等)来操作。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-03-19
  • 2020-07-15
  • 1970-01-01
  • 2011-09-11
  • 2012-09-07
  • 2019-08-15
  • 1970-01-01
相关资源
最近更新 更多