xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I found run perldoc local will print infomation about modules installed on local machine( I guess). But I can't find any doc about it. Does it a new thing or I miss something?





I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Replies are listed 'Best First'.
Re: what is perldoc local?
by haj (Vicar) on Jan 11, 2024 at 06:54 UTC

    I guess this refers to the file perllocal.pod. A not-so-well-known feature of perldoc is that you can omit the prefix perl, so perldoc local will do the same as perldoc perllocal (unless you have a local.pod on your Perl path).

    In my experience it returns a rather useless subset of installed modules - apparently only those I built myself using make install, i.e. where the module author used ExtUtils::MakeMaker. Modules I have installed with the package manager or with cpanm are not listed there.

    The way how perllocal.pod is maintained explains why you won't find anything about it on https://perldoc.perl.org.

      very clear to me, many thanks!




      I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

      > I guess this refers to the file perllocal.pod.

      Yes!

      ~ perldoc -l local /data/data/com.termux/files/usr/lib/perl5/5.36.0/aarch64-android/perll +ocal.pod

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery

      apparently only those I built myself

      Just for fun, I tried perldoc local. The first few modules it gave me are all core modules so not ones I've built myself...

      Archive::Tar and CPAN being the first two.

        That's ...interesting, given that perllocal.pod is an artifact of ExtUtils::MakeMaker. I wonder who wrote that on your machine for core modules?

        Or, maybe, not so interesting, but merely indicating that perldoc local can fail to be useful in different ways.