[Rt-commit] rt branch, 3.8/perlcritic, updated. rt-3.8.10-196-g0cfba98
Alex Vandiver
alexmv at bestpractical.com
Thu Aug 11 18:02:06 EDT 2011
The branch, 3.8/perlcritic has been updated
via 0cfba984643883c7d1102852379bbcaa2a9cade9 (commit)
via 6b1422da47cacb615cc735b866ebd9cadc8aad9e (commit)
from 99909d566b27aaf89037c069175f64c2854d7899 (commit)
Summary of changes:
sbin/extract-message-catalog | 4 ++--
sbin/rt-dump-database.in | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 6b1422da47cacb615cc735b866ebd9cadc8aad9e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Aug 11 17:49:43 2011 -0400
Remove a needless string eval; qw() is equivalent to split here
diff --git a/sbin/extract-message-catalog b/sbin/extract-message-catalog
index 61ae3a7..8abffe7 100755
--- a/sbin/extract-message-catalog
+++ b/sbin/extract-message-catalog
@@ -196,14 +196,14 @@ sub extract_strings_from_code {
# Comment-based qw mark: "qw(...)" # loc_qw
$line = 1;
pos($_) = 0;
- while (m/\G.*?(?:(qw\([^)]+\))[\}\)\],;]*)?$re_loc_qw_suffix/smgo) {
+ while (m/\G.*?(?:qw\(([^)]+)\)[\}\)\],;]*)?$re_loc_qw_suffix/smgo) {
my $str = $1;
$line += ( () = ( $& =~ /\n/g ) ); # cryptocontext!
unless ( defined $str ) {
warn "Couldn't process loc_qw at $filename:$line";
next;
}
- foreach my $value (eval($str)) {
+ foreach my $value (split ' ', $str) {
push @{ $FILECAT->{$value} }, [ $filename, $line, '' ];
}
}
commit 0cfba984643883c7d1102852379bbcaa2a9cade9
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Aug 11 18:01:40 2011 -0400
The :encode(UTF8) layer is safer than :utf8, as it actually encodes/decodes the bytes
This is equivilent to using Encode::encode_utf8 rather than Encode::_utf8_off
diff --git a/sbin/rt-dump-database.in b/sbin/rt-dump-database.in
index b6cf4b9..f4eb78c 100755
--- a/sbin/rt-dump-database.in
+++ b/sbin/rt-dump-database.in
@@ -50,7 +50,7 @@ use strict;
# As we specify that XML is UTF-8 and we output it to STDOUT, we must be sure
# it is UTF-8 so further XMLin will not break
-binmode(STDOUT, ":utf8");
+binmode(STDOUT, ":encoding(UTF8)");
# fix lib paths, some may be relative
BEGIN {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list