CPAN Patch workflow
I just wanted to write up a quick note on my workflow for CPAN patches, because I’m so pleased with it.
I use three tools:
When I first see a module that needs some love, like today I saw that
Gazelle
needed some POD reformatting,
first I clone it (using Git::CPAN::Patch
):
git cpan clone Gazelle
Then I fork it, so that I can make a pull request (using git-hub
), make a
branch, and set it up to track my fork.
git hub fork
git checkout -b doc-patches
git push frioux HEAD -u
Then I edit and commit my changes (using fugitive.vim
):
vi $file
" hack hack hack
:Gwrite " stages the current file
:Gcommit -v " gives me a tab to commit the changes
:Gpush " push to my github fork
After doing a few rounds of that I make my pull request (using git-hub
:)
git hub pr-new cpan
And then I’m basically done! This is more work than using the Github web interface, but for anything more than a simple typo fix, it’s pretty awesome.
Note that the above doesn’t work as well for non-github repos.
Git::CPAN::Patch
knows how to send patches with git cpan send-email
, but I
haven’t figured out how to make it work. If you know how to configure it to
send via gmail let me know in the comments!
UPDATE: See details that resolve the above issues here.
Posted Thu, Jul 30, 2015If you're interested in being notified when new posts are published, you can subscribe here; you'll get an email once a week at the most.