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

Hi Perl Experts

I was wondering whether we have chance to look at the source code of the Perl standard modules like List::MoreUtils?

I used some built-in functions and was amazed by how they work that well. Would be of great interest and curiosity to see what is inside but I searched online didn't get my luck. Any one knows? Thanks in advance!

Replies are listed 'Best First'.
Re: Access to standard module source code?
by choroba (Cardinal) on Nov 15, 2017 at 23:18 UTC
Re: Access to standard module source code?
by 1nickt (Canon) on Nov 15, 2017 at 23:31 UTC

    Hi, you can also pass the  -m flag to perldoc, which will display the entire source of the module.

    Shell command:

    $ perldoc -m List::MoreUtils
    Output:
    package List::MoreUtils; use 5.008_001; use strict; use warnings; my $have_xs; ...

    Hope this helps!


    The way forward always starts with a minimal test.