Git::CP...::Import(3)
π Git::CPAN::Patch::Command::Import β the manual, but make it make sense π
okay bestie, so this is the page for Git::CPAN::Patch::Command::Import (yes, the title is a whole mouthful, we're abbreviating it in the header as Git::CP...::Import(3), it's from the User Contributed Perl Documentation, iykyk). Sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
Git::CPAN::Patch::Command::Import β basically: import a module into a git repository π
πΈ VERSION πΈ
version 2.5.0
π¦ SYNOPSIS π¦
so it takes literally any string that CPANPLUS handles. like, any. watch:
# takes any string CPANPLUS handles:
% git-cpan import Foo::Bar
% git-cpan import A/AU/AUTHORID/Foo-Bar-0.03.tar.gz
% git-cpan import http://backpan.cpan.org/authors/id/A/AU/AUTHORID/Foo-Bar-0.03.tar.gz
# If the repository is already initialized, can be run with no arguments to
# import the latest version
git-cpan import
the way that last one just works with zero arguments when your repo is already initialized... lowkey iconic, no notes π
π DESCRIPTION π
This command is used internally by git-cpan-init, git-cpan-update and git-backpan-init. it's giving backstage crew energy β it's doing the work behind the scenes.
What it actually does: takes a tarball, extracts it, and imports it into the repository. that's the whole thing, and it slays at it.
heads up though β it is only possible to update to a newer version of a module. going backwards? not a thing. don't try it π
The module history is tracked in refs/remotes/cpan/master. remember that path, bestie, it's where the lore lives.
Tags are created for each version of the module. every single one. tagged. catalogued. cute β¨
This command does not touch the working directory, and is safe to run even if you have pending work. so you can be mid-edit, mid-mess, mid-everything, and still run this. obsessed with the lack of chaos π«Ά
π OPTIONS π
--check,--nocheckβ explicitly turns version checking on/off. and bestie, it's on by default. what that means isgit-cpan-importwill straight up refuse to import a version of the package that has a smaller version number than the HEAD of the branchcpan/master. it's the bouncer at the club and it does not care about your excuses π--parentβ lets you add extra parents when importing, so that when a patch has been incorporated into an upstream version, the generated commit is like a merge commit, incorporating both the CPAN history and the user's local history. two histories, one commit, main character energy π
for example, this will set the current HEAD of the master branch as a parent of the imported CPAN package:
$ git checkout master
$ git-cpan import --parent HEAD My-Module
and you can specify more than one --parent. stack 'em. go off π₯
--author_nameβ forces the author name to the given value, instead of trying to resolve it from the release metadata. you said what you said.--author_emailβ forces the author email to the given value, instead of trying to resolve it from the release metadata. same vibe, different field.
π AUTHORS π
Yuval Kogman "<nothingmuch@woobling.org>"
Yanick Champoux "<yanick@cpan.org>"
β SEE ALSO β
Git::CPAN::Patch
π AUTHOR π
Yanick Champoux <yanick@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2022, 2021, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009 by Yanick Champoux.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie πΈ β this version of the doc is from perl v5.42.0, dated 2025-07-25, and it's listed as Git::CP...::Import(3) in the User Contributed Perl Documentation. go forth and git-cpan import something, ily, bye π«Άπ
π¦ where this page comes from
- fedora 43: perl-Git-CPAN-Patch 2.5.0-10.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms