{"id":18246170,"url":"https://github.com/mfcovington/perl-prereqinstaller","last_synced_at":"2026-07-14T06:31:39.699Z","repository":{"id":18606541,"uuid":"21811659","full_name":"mfcovington/Perl-PrereqInstaller","owner":"mfcovington","description":"A Perl 5 module for installing missing modules explicitly loaded by a Perl script or module","archived":false,"fork":false,"pushed_at":"2016-01-29T09:18:08.000Z","size":76,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-10-19T19:25:07.279Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://cpan.me/Perl::PrereqInstaller","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfcovington.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-14T07:52:46.000Z","updated_at":"2014-09-10T05:41:46.000Z","dependencies_parsed_at":"2022-09-25T01:02:16.619Z","dependency_job_id":null,"html_url":"https://github.com/mfcovington/Perl-PrereqInstaller","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/mfcovington/Perl-PrereqInstaller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfcovington%2FPerl-PrereqInstaller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfcovington%2FPerl-PrereqInstaller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfcovington%2FPerl-PrereqInstaller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfcovington%2FPerl-PrereqInstaller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfcovington","download_url":"https://codeload.github.com/mfcovington/Perl-PrereqInstaller/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfcovington%2FPerl-PrereqInstaller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35450066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T09:24:50.006Z","updated_at":"2026-07-14T06:31:39.682Z","avatar_url":"https://github.com/mfcovington.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/mfcovington/Perl-PrereqInstaller.svg?branch=master)](https://travis-ci.org/mfcovington/Perl-PrereqInstaller) [![Coverage Status](https://coveralls.io/repos/mfcovington/Perl-PrereqInstaller/badge.png?branch=master)](https://coveralls.io/r/mfcovington/Perl-PrereqInstaller?branch=master)\n\n# NAME\n\nPerl::PrereqInstaller - Install missing modules explicitly\nloaded in Perl files\n\n# VERSION\n\nVersion 0.6.2\n\n# SYNOPSIS\n\nScan, Install, and report results via command line:\n\n    install-perl-prereqs lib/ bin/\n\nScan files and Install modules via script:\n\n    use Perl::PrereqInstaller;\n    my $installer = Perl::PrereqInstaller-\u003enew;\n    $installer-\u003escan( @files, @directories );\n    $installer-\u003ecpanm;\n\n    $installer-\u003equiet(1);\n\nAccess and report scan/install status via script:\n\n    my @not_installed  = $installer-\u003enot_installed;\n    my @prev_installed = $installer-\u003epreviously_installed;\n\n    my @newly_installed = $installer-\u003enewly_installed;\n    my @failed_install  = $installer-\u003efailed_install;\n\n    my @scan_errors   = $installer-\u003escan_errors;\n    my %scan_warnings = $installer-\u003escan_warnings;\n\n    $installer-\u003ereport;\n\n# DESCRIPTION\n\nExtract the names of the modules explicitly loaded in Perl files,\ncheck which modules are not installed, and install the missing\nmodules. Since this module relies on\n[Perl::PrereqScanner](https://metacpan.org/pod/Perl::PrereqScanner) to statically identify\ndependencies, it has the same caveats regarding identifying loaded\nmodules. Therefore, modules that are loaded dynamically (e.g.,\n`eval \"require $class\"`) will not be identified as dependencies or\ninstalled.\n\n## Command-line tool\n\nCommand-line usage is possible with `install-perl-prereqs`\n(co-installed with this module).\n\n    install-perl-prereqs FILE_OR_DIR [FILE_OR_DIR ...]\n        -h, --help\n        -d, --dry-run\n        -q, --quiet\n        -v, --version\n        -w, --warnings\n\n## Methods for scanning files and installing modules\n\n- new\n\n    Initializes a new Perl::PrereqInstaller object.\n\n- scan( FILES and/or DIRECTORIES )\n\n    Analyzes all specified FILES (regardless of file type) and Perl files\n    (.pl/.pm/.cgi/.psgi/.t) within specified DIRECTORIES to generate a\n    list of modules explicitly loaded and identify which are not\n    currently installed. Subsequent use of `scan()` will update the\n    lists of not yet installed and previously installed modules.\n\n- cpanm\n\n    Use cpanm to install loaded modules that are not currently installed.\n\n- quiet( BOOLEAN )\n\n    Set quiet mode to on/off (default: off). Quiet mode turns off most\n    of the output. If BOOLEAN is not provided, this method returns quiet\n    mode's current state.\n\n## Methods for accessing and reporting scan/install status\n\n- not\\_installed\n\n    Returns an alphabetical list of unique modules that were explicitly\n    loaded, but need to be installed. Modules are removed from this list\n    upon installation.\n\n- previously\\_installed\n\n    Returns an alphabetical list of unique installed modules that were\n    explicitly loaded.\n\n- newly\\_installed\n\n    Returns an alphabetical list of unique modules that were\n    explicitly loaded, needed to be installed, and were successfully\n    installed.\n\n- failed\\_install\n\n    Returns an alphabetical list of unique modules that were\n    explicitly loaded and needed to be installed, but whose installation\n    failed.\n\n- scan\\_errors\n\n    Returns a list of files that produced a parsing error\n    when being scanned. These files are skipped.\n\n- scan\\_warnings\n\n    Returns a hash of arrays containing the names of files (the keys) that\n    raised warnings (the array contents) during parsing. These warnings\n    are likely indicative of issues with the code in the parsed files\n    rather than actual parsing problems.\n\n- report\n\n    Write (to STDOUT) a summary of scan/install results. By default, all\n    status methods below (except `scan_warnings`) are summarized. To\n    customize the contents of `report()`, pass it an anonymous hash:\n\n        $installer-\u003ereport(\n            {   'not_installed'        =\u003e 0,\n                'previously_installed' =\u003e 0,\n                'newly_installed'      =\u003e 1,\n                'failed_install'       =\u003e 1,\n                'scan_errors'          =\u003e 0,\n                'scan_warnings'        =\u003e 0,\n            }\n        );\n\n# SEE ALSO\n\n[Perl::PrereqScanner](https://metacpan.org/pod/Perl::PrereqScanner),\n[App::cpanoutdated](https://metacpan.org/pod/App::cpanoutdated),\n[lib::xi](https://metacpan.org/pod/lib::xi),\n[Module::Extract::Use](https://metacpan.org/pod/Module::Extract::Use)\n\nThe command-line tool `scan-perl-prereqs` gets installed together\nwith [Perl::PrereqScanner](https://metacpan.org/pod/Perl::PrereqScanner). The basic\nfunctionality of `install-perl-prereqs` can be recreated with\n`scan-perl-prereqs | cpanm`; however, `install-perl-prereqs` comes\nwith a few bonuses. These include:\n\n- Better error handling\n\n    In the event of parse errors, `scan-perl-prereqs` dies even if there\n    are files remaining to be scanned, whereas `install-perl-prereqs`\n    logs the error and scans the next file.\n\n- Summary report\n\n    `install-perl-prereqs` provides a summary of scan and install\n    results.\n\n- No unexpected updates\n\n    While `scan-perl-prereqs | cpanm` attempts to update all\n    previously-installed modules found in a scan, `install-perl-prereqs`\n    only attempts to install modules if they are not yet installed.\n\n    Perhaps a better way to update installed CPAN modules is to use\n    [cpan-outdated](https://metacpan.org/pod/cpan-outdated) (from\n    [App::cpanoutdated](https://metacpan.org/pod/App::cpanoutdated)):\n\n        cpan-outdated -p | cpanm\n\n# SOURCE AVAILABILITY\n\nThe source code is on Github:\n[https://github.com/mfcovington/Perl-PrereqInstaller](https://github.com/mfcovington/Perl-PrereqInstaller)\n\n# AUTHOR\n\nMichael F. Covington, \u003cmfcovington@gmail.com\u003e\n\n# BUGS\n\nPlease report any bugs or feature requests at\n[https://github.com/mfcovington/Perl-PrereqInstaller/issues](https://github.com/mfcovington/Perl-PrereqInstaller/issues).\n\n# INSTALLATION\n\nTo install this module from GitHub using cpanm:\n\n    cpanm git@github.com:mfcovington/Perl-PrereqInstaller.git\n\nAlternatively, download and run the following commands:\n\n    perl Build.PL\n    ./Build\n    ./Build test\n    ./Build install\n\n# SUPPORT AND DOCUMENTATION\n\nYou can find documentation for this module with the perldoc command.\n\n    perldoc Perl::PrereqInstaller\n\n# LICENSE AND COPYRIGHT\n\nCopyright 2014 Michael F. Covington.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the the Artistic License (2.0). You may obtain a\ncopy of the full license at:\n\n[http://www.perlfoundation.org/artistic\\_license\\_2\\_0](http://www.perlfoundation.org/artistic_license_2_0)\n\nAny use, modification, and distribution of the Standard or Modified\nVersions is governed by this Artistic License. By using, modifying or\ndistributing the Package, you accept this license. Do not use, modify,\nor distribute the Package, if you do not accept this license.\n\nIf your Modified Version has been derived from a Modified Version made\nby someone other than you, you are nevertheless required to ensure that\nyour Modified Version complies with the requirements of this license.\n\nThis license does not grant you the right to use any trademark, service\nmark, tradename, or logo of the Copyright Holder.\n\nThis license includes the non-exclusive, worldwide, free-of-charge\npatent license to make, have made, use, offer to sell, sell, import and\notherwise transfer the Package with respect to any patent claims\nlicensable by the Copyright Holder that are necessarily infringed by the\nPackage. If you institute patent litigation (including a cross-claim or\ncounterclaim) against any party alleging that the Package constitutes\ndirect or contributory patent infringement, then this Artistic License\nto you shall terminate on the date that such litigation is filed.\n\nDisclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER\nAND CONTRIBUTORS \"AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\nPURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY\nYOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR\nCONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR\nCONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,\nEVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfcovington%2Fperl-prereqinstaller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfcovington%2Fperl-prereqinstaller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfcovington%2Fperl-prereqinstaller/lists"}