[Rt-commit] rt branch, 4.2/shredder-critic, repushed
Alex Vandiver
alexmv at bestpractical.com
Mon Jul 7 11:59:39 EDT 2014
The branch 4.2/shredder-critic was deleted and repushed:
was df973f3c2b23ee92eabf0f086856e4cb5670e7ac
now b49a9712f9d9a0d6e3f7e1ea2786ff165bddf774
1: ae4dfa4 ! 1: e4cca37 Stop using map in void context for its aliasing effect
@@ -1,6 +1,6 @@
-Author: Ruslan Zakirov <ruz at bestpractical.com>
+Author: Alex Vandiver <alexmv at bestpractical.com>
- use foreach to edit array, not map
+ Stop using map in void context for its aliasing effect
diff --git a/lib/RT/Shredder/Plugin/Attachments.pm b/lib/RT/Shredder/Plugin/Attachments.pm
--- a/lib/RT/Shredder/Plugin/Attachments.pm
@@ -10,7 +10,7 @@
return (0, "Internal error: '". $sth->err ."'. Please send bug report.") if $sth->err;
- map { $_ = "RT::Attachment-$_" } @objs;
-+ $_ = "RT::Attachment-$_" foreach @objs;
++ @objs = map {"RT::Attachment-$_"} @objs;
return (1, @objs);
}
2: 08cdd54 ! 2: df8ee51 Switch to using UNIVERSAL::require rather than eval "require $_"
@@ -144,6 +144,19 @@
use Text::ParseWords qw/shellwords/;
+diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
+--- a/lib/RT/Interface/Web.pm
++++ b/lib/RT/Interface/Web.pm
+@@
+ require HTML::Scrubber;
+ my $scrubber = HTML::Scrubber->new();
+
+- if (eval "require HTML::Gumbo; 1") {
++ if (HTML::Gumbo->require) {
+ no warnings 'redefine';
+ my $orig = \&HTML::Scrubber::scrub;
+ *HTML::Scrubber::scrub = sub {
+
diff --git a/lib/RT/Interface/Web/Handler.pm b/lib/RT/Interface/Web/Handler.pm
--- a/lib/RT/Interface/Web/Handler.pm
+++ b/lib/RT/Interface/Web/Handler.pm
@@ -355,14 +368,14 @@
--- a/share/html/Admin/Tools/Theme.html
+++ b/share/html/Admin/Tools/Theme.html
@@
-
- use List::MoreUtils qw(uniq);
-
--my $has_color_analyzer = eval { require Convert::Color; 1 };
-+my $has_color_analyzer = Convert::Color->require;
- my $colors;
- my %gd_can;
my $valid_image_types;
+ my $analyze_img = sub {
+ return undef if RT->Config->Get('DisableGD');
+- return undef unless eval { require Convert::Color; 1 };
++ return undef unless Convert::Color->require;
+
+ require GD;
+
diff --git a/t/api/i18n_guess.t b/t/api/i18n_guess.t
--- a/t/api/i18n_guess.t
3: e55df2e ! 3: a9cd7d1 Move all code after package definition
@@ -1,6 +1,6 @@
Author: Ruslan Zakirov <ruz at bestpractical.com>
- More all code after package definition
+ Move all code after package definition
diff --git a/lib/RT/Shredder/ACE.pm b/lib/RT/Shredder/ACE.pm
--- a/lib/RT/Shredder/ACE.pm
4: 7c1576d ! 4: cbd4a9c decriticize shredder's code
@@ -56,11 +56,7 @@
{ my $mark = 1; # XXX: integer overflows?
@@
- sub PopDumpMark {
- my $self = shift;
- foreach (@{ $self->{'dump_plugins'} }) {
-- my ($state, $msg) = $_->PushMark( @_ );
-+ my ($state, $msg) = $_->PopMark( @_ );
+ my ($state, $msg) = $_->PopMark( @_ );
die "Couldn't pop mark: $msg" unless $state;
}
+ return;
5: df973f3 = 5: b49a971 update perl critic policies
More information about the rt-commit
mailing list