X-Git-Url: http://andersk.mit.edu/gitweb/config-package-dev.git/blobdiff_plain/936cb21eddc84e106dc3c64f70ee49d51d4a8a16..7a1d9a7c37ef815939ca59b84c874186c6c0aacd:/encode diff --git a/encode b/encode index 2a787b4..8153ca3 100755 --- a/encode +++ b/encode @@ -1,8 +1,6 @@ #!/usr/bin/perl # Encode name of a file in a Debian package name. # -# DO NOT CHANGE THIS FUNCTION OR WE WILL ALL BURN IN CONFLICT HELL -# # The purpose of this encoding is to cause Debian configuration # packages (potentially from different sites) that divert the same # configuration file to conflict with each other. Thus, it is @@ -12,10 +10,12 @@ # This encoding is intended to be human-readable, so that users can # determine the cause of conflicts between different configuration # packages. + +use strict; +use warnings; $ARGV[0] =~ s,^/,,; -split('', $ARGV[0]); -foreach (@_){ +foreach (split('', $ARGV[0])) { if (m/[a-z0-9.-]/) { print "$_"; } elsif (m/[A-Z]/) {