]> andersk Git - config-package-dev.git/commitdiff
Fix encode script to work with Perl 5.12
authorAnders Kaseorg <andersk@mit.edu>
Tue, 25 Oct 2011 23:30:11 +0000 (19:30 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Tue, 25 Oct 2011 23:41:44 +0000 (19:41 -0400)
While we’re at it, turn on strict and warnings.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
debian/changelog
decode
encode

index 60283e01d2eb38c16dfbda8cbf915c758cc7af31..9ac242485b2d5411d546837ff34ed73400139b5d 100644 (file)
@@ -2,8 +2,10 @@ config-package-dev (4.13) UNRELEASED; urgency=low
 
   * Fix DEB_CHECK_FILES and DEB_TRANSFORM_FILES with non-conffiles in
     Multi-Arch: same packages.
+  * Fix encode script to work with Perl 5.12.  While we’re at it, turn on
+    strict and warnings.
 
- -- Anders Kaseorg <andersk@mit.edu>  Sun, 21 Aug 2011 22:41:41 -0400
+ -- Anders Kaseorg <andersk@mit.edu>  Tue, 25 Oct 2011 19:27:00 -0400
 
 config-package-dev (4.12) unstable; urgency=low
 
diff --git a/decode b/decode
index 73a216af44f5255d498d07818a3217d434a579f1..ac2c2b975540cc62c1b45598c1b8b414aa4095c5 100755 (executable)
--- a/decode
+++ b/decode
@@ -1,4 +1,8 @@
 #!/usr/bin/perl
+
+use strict;
+use warnings;
+
 $ARGV[0] =~ s/\+([^+]*)\+/unparse($1)/eg;
 print $ARGV[0];
 sub unparse {
diff --git a/encode b/encode
index 48ba732618051343c8c3d9f3a8b5442ccc024aff..8153ca38de4268be6b448ccd7fbf1fccddd424f0 100755 (executable)
--- a/encode
+++ b/encode
 # 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]/) {
This page took 0.093861 seconds and 5 git commands to generate.