Dist::Surveyor - Survey installed modules and determine the specific distribution versions they came from


    my $options = {
        opt_match => $opt_match,
        opt_perlver => $opt_perlver,
        opt_remnants => $opt_remnants,
        distro_key_mod_names => $distro_key_mod_names,
    my @installed_releases = determine_installed_releases($options, \@libdirs);


Surveys your huge ball of Perl modules, jammed together inside a directory, and tells you exactly which module is installed there.

For quick start, and a fine example of this module usage, see dist_surveyor.

This module have one exported function - determine_installed_releases

determine_installed_releases($options, $search_dirs)

$options includes:


A regex qr//. If exists, will ignore modules that doesn't match this regex


Skip modules that are included as core in this Perl version


If true, output will include old distribution versions that have left old modules behind


A hash-ref, with a list of irregular named releases. i.e. 'libwww-perl' => 'LWP'.

$search_dirs is an array-ref containing the list of directories to survey.

Returns a list, where each element is a hashref representing one installed distibution. This hashref is what MetaCPAN returns for$author/$release, with two additional keys:

  • 'url' - that same as 'download_url', but without the hostname. can be used to download the file for your favorite mirror

  • 'dist_data' - Hashref containing info about the release, i.e. percent_installed. (fully installed releases will have '100.00')


This module checks $::DEBUG and $::VERBOSE for obvious proposes.

This module uses Dist::Surveyor::Inquiry to communicate with MetaCPAN. Check that module's documentation for options and caching.

You can use Dist::Surveyor::MakeCpan to take the list of releases and create a mini-cpan containing them.


Written by Tim Bunce <>

Maintained by Fomberg Shmuel <>, Dan Book <>


Copyright 2011-2013 by Tim Bunce.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.