Skip to content

Instantly share code, notes, and snippets.

@Altreus
Created April 18, 2018 15:30
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 Altreus/e693f739227806f8cf02bf898724cb95 to your computer and use it in GitHub Desktop.
Save Altreus/e693f739227806f8cf02bf898724cb95 to your computer and use it in GitHub Desktop.
Update Perl modules so package line matches path
find lib -name '*.pm' | xargs perl -pi -E'(s{^package \K.*;$}{join("::", split "/", ($ARGV =~ s!lib/|\.pm!!gr)) . ";"}e and $seen{$ARGV}++) unless $seen{$ARGV}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment