X-Git-Url: http://andersk.mit.edu/gitweb/config-package-dev.git/blobdiff_plain/ab8e2a67ce47fada2ae30371f954ab9dd570245c..HEAD:/encode diff --git a/encode b/encode index e69cdf6..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,11 +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; -print "configures-"; $ARGV[0] =~ s,^/,,; -split('', $ARGV[0]); -foreach (@_){ +foreach (split('', $ARGV[0])) { if (m/[a-z0-9.-]/) { print "$_"; } elsif (m/[A-Z]/) {