Skip to content
Sections
>> Trisquel >> 套件 >> etiona >> perl >> libmodule-want-perl
etiona  ] [  nabia  ] [  aramo  ]
[ 原始碼: libmodule-want-perl  ]

套件: libmodule-want-perl (0.6-2)

module to check @INC only once for wanted modules

Sometimes you want to lazy load a module for use in, say, a loop or function. First you do the eval-require but then realize if the module is not available it will re-search @INC each time. So then you add a lexical boolean to your eval and do the same simple logic all over the place.

Module::Want encapsulates that logic so that have_mod() is like eval { require X; 1 } but if the module can't be loaded it will remember that fact and not look in @INC again on subsequent calls.

其他與 libmodule-want-perl 有關的套件

  • 依賴
  • 推薦
  • 建議
  • dep: perl
    Larry Wall's Practical Extraction and Report Language

下載 libmodule-want-perl

下載可用於所有硬體架構的
硬體架構 套件大小 安裝後大小 檔案
all 11.1 kB57 kB [文件列表]