Git::CP...::Import(3)

πŸ“¦
version 2.5.0 Β· 2 versions
, in fedora 43

πŸ’– 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 is git-cpan-import will straight up refuse to import a version of the package that has a smaller version number than the HEAD of the branch cpan/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>


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