{"id":15018824,"url":"https://github.com/atrodo/app-mechacpan","last_synced_at":"2025-04-09T19:43:12.592Z","repository":{"id":56838900,"uuid":"69980155","full_name":"atrodo/App-MechaCPAN","owner":"atrodo","description":" Mechanize the installation of CPAN things","archived":false,"fork":false,"pushed_at":"2023-08-23T02:32:51.000Z","size":664,"stargazers_count":2,"open_issues_count":8,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T21:45:47.534Z","etag":null,"topics":["cpan","perl"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atrodo.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-04T15:43:37.000Z","updated_at":"2023-07-18T09:07:32.000Z","dependencies_parsed_at":"2024-09-28T19:01:26.286Z","dependency_job_id":"1206b293-36b4-4684-b207-954e8e425197","html_url":"https://github.com/atrodo/App-MechaCPAN","commit_stats":{"total_commits":290,"total_committers":4,"mean_commits":72.5,"dds":"0.017241379310344862","last_synced_commit":"269af2cf0942d67c1d830bfeb8ff2dfcc7e1685a"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atrodo%2FApp-MechaCPAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atrodo%2FApp-MechaCPAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atrodo%2FApp-MechaCPAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atrodo%2FApp-MechaCPAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atrodo","download_url":"https://codeload.github.com/atrodo/App-MechaCPAN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248101409,"owners_count":21047968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cpan","perl"],"created_at":"2024-09-24T19:52:30.381Z","updated_at":"2025-04-09T19:43:12.565Z","avatar_url":"https://github.com/atrodo.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nApp::MechaCPAN - Mechanize the installation of CPAN things.\n\n# SYNOPSIS\n\n    # Install 5.24 into local/perl/\n    user@host:~$ mechacpan perl 5.24\n    \n    # Install Catalyst into local/\n    user@host:~$ mechacpan install Catalyst\n    \n    # Install everything from the cpanfile into local/\n    # If cpanfile.snapshot exists, it will be consulted first\n    user@host:~$ mechacpan install\n    \n    # Install perl and everything from the cpanfile into local/\n    # If cpanfile.snapshot exists, it will be consulted exclusivly\n    user@host:~$ mechacpan deploy\n    user@host:~$ zhuli do the thing\n\n# DESCRIPTION\n\nApp::MechaCPAN Mechanizes the installation of perl and CPAN modules.\nIt is designed to be small and focuses more on installing things in a self-contained manner. That means that everything is installed into a `local/` directory.\n\nMechaCPAN was created because installation of a self-contained deployment required at least 4 tools:\n\n- plenv/Perl-Build or perlbrew to manage perl installations\n- cpanm to install packages\n- local::lib to use locally installed modules\n- carton to manage and deploy exact package versions\n\nIn development these tools are invaluable, but when deploying a package, installing at least 4 packages from github, CPAN and the web just for a small portion of each tool is more than needed. App::MechaCPAN aims to be a single tool that can be used for deploying packages in a automated fashion.\n\nApp::MechaCPAN focuses on the aspects of these tools needed for deploying packages to a system. For instance, it will read and use carton's `cpanfile.snapshot` files, but cannot create them. To create `cpanfile.snapshot` files, you must use carton.\n\n## Should I use App::MechaCPAN instead of \u0026lt;tool\u003e\n\nProbably not, no. It can be used in place of some tools, but its focus is not on the features a developer needs. If your needs are very simple and you don't need many options, you might be able to get away with only using `App::MechaCPAN`. However be prepared to run into limitations quickly.\n\n# USING FOR DEPLOYMENTS\n\n## COMMANDS\n\n    user@host:~/project/$ ls -la\n    drwxr-xr-x  6 user users 20480 Jan 18 13:00 .\n    drwxr-xr-x 25 user users  4096 Jan 18 13:00 ..\n    drwxr-xr-x  8 user users  4096 Jan 18 13:05 .git\n    -rw-r--r--  1 user users     7 Jan 18 13:06 .perl-version\n    -rw-r--r--  1 user users   109 Jan 18 13:06 cpanfile\n    drwxr-xr-x  3 user users  4096 Jan 18 13:10 lib\n    \n    user@host:~/project/$ mechacpan deploy\n\nThat command will do 2 things:\n\n- Install perl\n\n    It will install perl into the directory local/perl.  It will use the version in `.perl-version` to decide what version will be installed.\n\n- Install modules\n\n    Then it will use the installed perl to install all the module dependencies that are listed in the cpanfile.\n\n# COMMANDS\n\n## Perl\n\n    user@host:~$ mechacpan perl 5.24\n\nThe [perl](https://metacpan.org/pod/App%3A%3AMechaCPAN%3A%3APerl) command is used to install [perl](https://metacpan.org/pod/perl) into `local/`. This removes the packages dependency on the operating system perl. By default, it tries to be helpful and include `lib/` and `local/` into `@INC` automatically, but this feature can be disabled. See [App::MechaCPAN::Perl](https://metacpan.org/pod/App%3A%3AMechaCPAN%3A%3APerl) for more details.\n\n## Install\n\n    user@host:~$ mechacpan install Catalyst\n\nThe [install](https://metacpan.org/pod/App%3A%3AMechaCPAN%3A%3AInstall) command is used for installing specific modules. All modules are installed into the `local/` directory. See See [App::MechaCPAN::Install](https://metacpan.org/pod/App%3A%3AMechaCPAN%3A%3AInstall) for more details.\n\n## Deploy\n\n    user@host:~$ mechacpan deploy\n\nThe [deploy](https://metacpan.org/pod/App%3A%3AMechaCPAN%3A%3ADeploy) command is used for automating a deployment. It will install both [perl](https://metacpan.org/pod/perl) and all the modules specified from the `cpanfile`. If there is a `cpanfile.snapshot` that was created by [Carton](https://metacpan.org/pod/Carton), `deploy` will treat the modules lised in the snapshot file as the only modules available to install. See [App::MechaCPAN::Deploy](https://metacpan.org/pod/App%3A%3AMechaCPAN%3A%3ADeploy) for more details.\n\n# OPTIONS\n\nBesides the options that the individual commands take, `App::MechaCPAN` takes several that are always available.\n\n## --verbose\n\nBy default only informational descriptions of what is happening is shown. Turning verbose on will show every command and all output produced by running each command. Note that this is **not** the opposite of quiet.\n\n## --quiet\n\nUsing quiet means that the normal information descriptions are hidden. Note that this is **not** the opposite of verbose, turning both options on means no descriptions will be show, but all output from all commands will be.\n\n## --no-log\n\nA log is normally outputted into the `local/logs` directory. This option will prevent a log from being created.\n\n## --directory=\u0026lt;path\u003e\n\nChanges to a specified directory before any processing is done. This allows you to specify what directory you want `local/` to be in. If this isn't provided, the current working directory is used instead.\n\n## --build-reusable-perl\n\nGiving this options will override the mode of operation and generate a reusable, relocatable [perl](https://metacpan.org/pod/perl) archive. This accepts the same parameters as the [Perl](https://metacpan.org/pod/App%3A%3AMechaCPAN%3A%3APerl) command (i.e. [\"devel\"](#devel) and [\"threads\"](#threads)) to generate the binary. Note that the `lib/` directory is always included unless the [--skip-lib](https://metacpan.org/pod/App%3A%3AMechaCPAN%3A%3APerl#skip-lib) option is included. The archive name will generally reflect what systems the resuling archive can run on. Because of the nature of how [perl](https://metacpan.org/pod/perl) builds binaries, it cannot guarantee that it will work on any given system. This option will have the best luck if you use it with the same version of a distribution.\n\nOnce you have a reusable binary archive, [App::MechaCPAN::Perl](https://metacpan.org/pod/App%3A%3AMechaCPAN%3A%3APerl) can use that archive as a source file and install the binaries into the local directory. This can be handy if you are building a lot of identical systems and only want to build [perl](https://metacpan.org/pod/perl) once.\n\nThe exact parameters included in the archive name are:\n\n- The version built\n- The architecture name, as found in the first piece of $Config{archname}\n- The Operating System, as found in $Config{osname}\n- Optionally notes if it was built with threads\n- The name of the libc used\n- The version of the libc used\n- The `so` version of libraries used, with common libaries being abbreviated\n\nAn example archive name would be `perl-v5.36.0-x86_64-linux-glibc-2.35-y1.1n2.0u1.tar.xz`\n\n## `$ENV{MECHACPAN_TIMEOUT}`\n\nEvery command that `App::MechaCPAN` runs is given an idle timeout before it is killed and a failure is returned. This timeout is reset every time the command outputs to `STDOUT` or `STDERR`. Using the environment variable `MECHACPAN_TIMEOUT`, you can override or disable this timeout. It is always in seconds and setting it to 0 will disable it. The default is 60 seconds.\n\n# SCRIPT RESTART WARNING\n\nThis module **WILL** restart the running script **IF** it's used as a module (e.g. with `use`) and the perl that is running is not the version installed in `local/`. It does this at two points: First right before run-time and Second right after a perl is installed into `local/`. During restart, `App::MechaCPAN` will attempt to install itself into `local/` unless it was invoked as a fully-contained version of `mechacpan`.\n\nThe scripts and modules that come with `App::MechaCPAN` are prepared to handle this. If you use `App::MechaCPAN` as a module, you should to be prepared to handle it as well.\n\nThis means that any END and DESTROY blocks **WILL NOT RUN**. Anything created with File::Temp will be cleaned up, however.\n\n# AUTHOR\n\nJon Gentle \u003ccpan@atrodo.org\u003e\n\n# COPYRIGHT\n\nCopyright 2017- Jon Gentle\n\n# LICENSE\n\nThis is free software. You may redistribute copies of it under the terms of the Artistic License 2 as published by The Perl Foundation.\n\n# SEE ALSO\n\n- [App::cpanminus](https://metacpan.org/pod/App%3A%3Acpanminus)\n- [local::lib](https://metacpan.org/pod/local%3A%3Alib)\n- [Carton](https://metacpan.org/pod/Carton)\n- [CPAN](https://metacpan.org/pod/CPAN)\n- [plenv](https://github.com/tokuhirom/plenv)\n- [App::perlbrew](https://metacpan.org/pod/App%3A%3Aperlbrew)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatrodo%2Fapp-mechacpan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatrodo%2Fapp-mechacpan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatrodo%2Fapp-mechacpan/lists"}