Skip to content

Instantly share code, notes, and snippets.

@dolmen
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dolmen/323e28b3e17a620df963 to your computer and use it in GitHub Desktop.
Save dolmen/323e28b3e17a620df963 to your computer and use it in GitHub Desktop.
Dist::Zilla toolchain upgrade
# Just once
test -f ~/bin/traceuse-modules.sed || echo 's/^ *[1-9][0-9]*\. *\([A-Za-z][^ ,/]*\) .*$/\1/p' > ~/bin/traceuse-modules.sed
# Use Devel::TraceUse to find modules used in the Dist::Zilla build
perl -d:TraceUse=output:x.txt -S dzil listdeps > /dev/null
# Extract modules list from Devel::TraceUse output and upgrade them
sed -n -f ~/bin/traceuse-modules.sed x.txt | sort | xargs cpan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment