Created
April 18, 2018 15:30
-
-
Save Altreus/e693f739227806f8cf02bf898724cb95 to your computer and use it in GitHub Desktop.
Update Perl modules so package line matches path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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