[Rt-commit] rt branch, 3.8/perlcritic, updated. rt-3.8.10-61-g43a418f
Alex Vandiver
alexmv at bestpractical.com
Thu Jul 7 19:17:31 EDT 2011
The branch, 3.8/perlcritic has been updated
via 43a418fb49c8cd6a11ab4d8bddb2694cd6ae7e83 (commit)
via c3d46b98251411bbd3b7f4110284f4e4cae356ae (commit)
via f7b92491aba1abfa53559c51debcaa6f735a342c (commit)
via 0f879a48a44d5bbcffd3dd4952c807e8bb35d562 (commit)
from 18a3d63a3c81ddd79f76aa19a5ddc5cebe92bff6 (commit)
Summary of changes:
lib/RT/Attachment.pm | 3 +--
lib/RT/Attachments.pm | 3 +--
lib/RT/Attribute.pm | 3 +--
lib/RT/Attributes.pm | 3 +--
lib/RT/CachedGroupMember.pm | 3 +--
lib/RT/CachedGroupMembers.pm | 3 +--
lib/RT/CustomField.pm | 3 +--
lib/RT/CustomFieldValue.pm | 3 +--
lib/RT/CustomFieldValues.pm | 3 +--
lib/RT/CustomFields.pm | 3 +--
lib/RT/Group.pm | 3 +--
lib/RT/GroupMember.pm | 3 +--
lib/RT/GroupMembers.pm | 3 +--
lib/RT/Groups.pm | 3 +--
lib/RT/Link.pm | 3 +--
lib/RT/Links.pm | 3 +--
lib/RT/ObjectCustomField.pm | 3 +--
lib/RT/ObjectCustomFieldValue.pm | 3 +--
lib/RT/ObjectCustomFieldValues.pm | 3 +--
lib/RT/ObjectCustomFields.pm | 3 +--
lib/RT/Principal.pm | 3 +--
lib/RT/Principals.pm | 3 +--
lib/RT/Queue.pm | 3 +--
lib/RT/Queues.pm | 3 +--
lib/RT/Record.pm | 16 ++++++++++------
lib/RT/Scrip.pm | 3 +--
lib/RT/ScripAction.pm | 3 +--
lib/RT/ScripActions.pm | 3 +--
lib/RT/ScripCondition.pm | 3 +--
lib/RT/ScripConditions.pm | 3 +--
lib/RT/Scrips.pm | 3 +--
lib/RT/Template.pm | 3 +--
lib/RT/Templates.pm | 3 +--
lib/RT/Ticket.pm | 3 +--
lib/RT/Tickets.pm | 3 +--
lib/RT/Transaction.pm | 3 +--
lib/RT/Transactions.pm | 3 +--
lib/RT/User.pm | 3 +--
lib/RT/Users.pm | 3 +--
sbin/rt-dump-database.in | 3 ++-
share/html/Search/Bulk.html | 2 +-
41 files changed, 51 insertions(+), 84 deletions(-)
- Log -----------------------------------------------------------------
commit 0f879a48a44d5bbcffd3dd4952c807e8bb35d562
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jul 7 18:35:06 2011 -0400
Remove a case of map in void context
diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index e2b7574..5edd260 100755
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -245,7 +245,7 @@ unless ( defined $Rows ) {
my $title = loc("Update multiple tickets");
# Iterate through the ARGS hash and remove anything with a null value.
-map ( $ARGS{$_} =~ /^$/ && ( delete $ARGS{$_} ), keys %ARGS );
+delete $ARGS{$_} for grep { $ARGS{$_} =~ /^$/ } keys %ARGS;
my (@results);
commit f7b92491aba1abfa53559c51debcaa6f735a342c
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jul 7 18:32:29 2011 -0400
Correct a case which perlcritic parsed as map in void context
diff --git a/sbin/rt-dump-database.in b/sbin/rt-dump-database.in
index 099917d..b6cf4b9 100755
--- a/sbin/rt-dump-database.in
+++ b/sbin/rt-dump-database.in
@@ -189,8 +189,9 @@ no strict; use XML::Simple; *_ = XMLin(do { local \$/; readline(DATA) }, ForceAr
__DATA__
.
+my %out = map { ($_ => ($RV{$_} || [])) } @classes;
print XMLout(
- { map { ($_ => ($RV{$_} || [])) } @classes },
+ \%out,
RootName => 'InitialData',
NoAttr => 1,
SuppressEmpty => '',
commit c3d46b98251411bbd3b7f4110284f4e4cae356ae
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jul 7 18:44:00 2011 -0400
Convert to doing compile-time @ISA setting, using "use base"
diff --git a/lib/RT/Attachment.pm b/lib/RT/Attachment.pm
index e9a3dc6..5b9d9c0 100755
--- a/lib/RT/Attachment.pm
+++ b/lib/RT/Attachment.pm
@@ -72,8 +72,7 @@ package RT::Attachment;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/Attachments.pm b/lib/RT/Attachments.pm
index 40f25e4..e344645 100755
--- a/lib/RT/Attachments.pm
+++ b/lib/RT/Attachments.pm
@@ -75,8 +75,7 @@ package RT::Attachments;
use RT::SearchBuilder;
use RT::Attachment;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
index 01d8318..e24f024 100644
--- a/lib/RT/Attribute.pm
+++ b/lib/RT/Attribute.pm
@@ -72,8 +72,7 @@ package RT::Attribute;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/Attributes.pm b/lib/RT/Attributes.pm
index 2be0130..6e141cd 100644
--- a/lib/RT/Attributes.pm
+++ b/lib/RT/Attributes.pm
@@ -75,8 +75,7 @@ package RT::Attributes;
use RT::SearchBuilder;
use RT::Attribute;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/CachedGroupMember.pm b/lib/RT/CachedGroupMember.pm
index e8329ae..018fbf4 100755
--- a/lib/RT/CachedGroupMember.pm
+++ b/lib/RT/CachedGroupMember.pm
@@ -72,8 +72,7 @@ package RT::CachedGroupMember;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/CachedGroupMembers.pm b/lib/RT/CachedGroupMembers.pm
index c75a654..ed6b56d 100755
--- a/lib/RT/CachedGroupMembers.pm
+++ b/lib/RT/CachedGroupMembers.pm
@@ -75,8 +75,7 @@ package RT::CachedGroupMembers;
use RT::SearchBuilder;
use RT::CachedGroupMember;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/CustomField.pm b/lib/RT/CustomField.pm
index 408bd10..cdec07c 100755
--- a/lib/RT/CustomField.pm
+++ b/lib/RT/CustomField.pm
@@ -72,8 +72,7 @@ package RT::CustomField;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/CustomFieldValue.pm b/lib/RT/CustomFieldValue.pm
index bfff16c..d6c8be7 100755
--- a/lib/RT/CustomFieldValue.pm
+++ b/lib/RT/CustomFieldValue.pm
@@ -73,8 +73,7 @@ use RT::Record;
use RT::CustomField;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/CustomFieldValues.pm b/lib/RT/CustomFieldValues.pm
index 4fa062e..1a18e86 100755
--- a/lib/RT/CustomFieldValues.pm
+++ b/lib/RT/CustomFieldValues.pm
@@ -75,8 +75,7 @@ package RT::CustomFieldValues;
use RT::SearchBuilder;
use RT::CustomFieldValue;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/CustomFields.pm b/lib/RT/CustomFields.pm
index c1c4021..e0056e5 100755
--- a/lib/RT/CustomFields.pm
+++ b/lib/RT/CustomFields.pm
@@ -75,8 +75,7 @@ package RT::CustomFields;
use RT::SearchBuilder;
use RT::CustomField;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Group.pm b/lib/RT/Group.pm
index 7af79ce..b7624aa 100755
--- a/lib/RT/Group.pm
+++ b/lib/RT/Group.pm
@@ -72,8 +72,7 @@ package RT::Group;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/GroupMember.pm b/lib/RT/GroupMember.pm
index ae0160c..cf7a7bf 100755
--- a/lib/RT/GroupMember.pm
+++ b/lib/RT/GroupMember.pm
@@ -72,8 +72,7 @@ package RT::GroupMember;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/GroupMembers.pm b/lib/RT/GroupMembers.pm
index 5d821ad..6c0f1d7 100755
--- a/lib/RT/GroupMembers.pm
+++ b/lib/RT/GroupMembers.pm
@@ -75,8 +75,7 @@ package RT::GroupMembers;
use RT::SearchBuilder;
use RT::GroupMember;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Groups.pm b/lib/RT/Groups.pm
index 2ec2f79..cfaab9f 100755
--- a/lib/RT/Groups.pm
+++ b/lib/RT/Groups.pm
@@ -75,8 +75,7 @@ package RT::Groups;
use RT::SearchBuilder;
use RT::Group;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Link.pm b/lib/RT/Link.pm
index 1aff5ef..cadb9af 100755
--- a/lib/RT/Link.pm
+++ b/lib/RT/Link.pm
@@ -72,8 +72,7 @@ package RT::Link;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/Links.pm b/lib/RT/Links.pm
index d8b6025..c20693c 100755
--- a/lib/RT/Links.pm
+++ b/lib/RT/Links.pm
@@ -75,8 +75,7 @@ package RT::Links;
use RT::SearchBuilder;
use RT::Link;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/ObjectCustomField.pm b/lib/RT/ObjectCustomField.pm
index 14bb61b..2996daa 100644
--- a/lib/RT/ObjectCustomField.pm
+++ b/lib/RT/ObjectCustomField.pm
@@ -73,8 +73,7 @@ use RT::Record;
use RT::CustomField;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/ObjectCustomFieldValue.pm b/lib/RT/ObjectCustomFieldValue.pm
index 5f51ee6..552594e 100644
--- a/lib/RT/ObjectCustomFieldValue.pm
+++ b/lib/RT/ObjectCustomFieldValue.pm
@@ -73,8 +73,7 @@ use RT::Record;
use RT::CustomField;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/ObjectCustomFieldValues.pm b/lib/RT/ObjectCustomFieldValues.pm
index ca1ed08..d83275b 100644
--- a/lib/RT/ObjectCustomFieldValues.pm
+++ b/lib/RT/ObjectCustomFieldValues.pm
@@ -75,8 +75,7 @@ package RT::ObjectCustomFieldValues;
use RT::SearchBuilder;
use RT::ObjectCustomFieldValue;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/ObjectCustomFields.pm b/lib/RT/ObjectCustomFields.pm
index 053b1d1..4da2e38 100644
--- a/lib/RT/ObjectCustomFields.pm
+++ b/lib/RT/ObjectCustomFields.pm
@@ -75,8 +75,7 @@ package RT::ObjectCustomFields;
use RT::SearchBuilder;
use RT::ObjectCustomField;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Principal.pm b/lib/RT/Principal.pm
index 17a7346..b6b195a 100755
--- a/lib/RT/Principal.pm
+++ b/lib/RT/Principal.pm
@@ -72,8 +72,7 @@ package RT::Principal;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/Principals.pm b/lib/RT/Principals.pm
index ef2c4d7..5376cad 100755
--- a/lib/RT/Principals.pm
+++ b/lib/RT/Principals.pm
@@ -75,8 +75,7 @@ package RT::Principals;
use RT::SearchBuilder;
use RT::Principal;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Queue.pm b/lib/RT/Queue.pm
index c0a0229..b6530f5 100755
--- a/lib/RT/Queue.pm
+++ b/lib/RT/Queue.pm
@@ -72,8 +72,7 @@ package RT::Queue;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/Queues.pm b/lib/RT/Queues.pm
index e634a96..98e98a0 100755
--- a/lib/RT/Queues.pm
+++ b/lib/RT/Queues.pm
@@ -75,8 +75,7 @@ package RT::Queues;
use RT::SearchBuilder;
use RT::Queue;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Scrip.pm b/lib/RT/Scrip.pm
index b430a77..54e103b 100755
--- a/lib/RT/Scrip.pm
+++ b/lib/RT/Scrip.pm
@@ -76,8 +76,7 @@ use RT::ScripCondition;
use RT::ScripAction;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/ScripAction.pm b/lib/RT/ScripAction.pm
index 21a8a0e..14eb2d9 100755
--- a/lib/RT/ScripAction.pm
+++ b/lib/RT/ScripAction.pm
@@ -72,8 +72,7 @@ package RT::ScripAction;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/ScripActions.pm b/lib/RT/ScripActions.pm
index d2f987c..daf3290 100755
--- a/lib/RT/ScripActions.pm
+++ b/lib/RT/ScripActions.pm
@@ -75,8 +75,7 @@ package RT::ScripActions;
use RT::SearchBuilder;
use RT::ScripAction;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/ScripCondition.pm b/lib/RT/ScripCondition.pm
index 48ea27a..1aa2727 100755
--- a/lib/RT/ScripCondition.pm
+++ b/lib/RT/ScripCondition.pm
@@ -72,8 +72,7 @@ package RT::ScripCondition;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/ScripConditions.pm b/lib/RT/ScripConditions.pm
index 76777cb..7845f18 100755
--- a/lib/RT/ScripConditions.pm
+++ b/lib/RT/ScripConditions.pm
@@ -75,8 +75,7 @@ package RT::ScripConditions;
use RT::SearchBuilder;
use RT::ScripCondition;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Scrips.pm b/lib/RT/Scrips.pm
index 7e63217..4f2038a 100755
--- a/lib/RT/Scrips.pm
+++ b/lib/RT/Scrips.pm
@@ -75,8 +75,7 @@ package RT::Scrips;
use RT::SearchBuilder;
use RT::Scrip;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Template.pm b/lib/RT/Template.pm
index b77820d..bc53282 100755
--- a/lib/RT/Template.pm
+++ b/lib/RT/Template.pm
@@ -73,8 +73,7 @@ use RT::Record;
use RT::Queue;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/Templates.pm b/lib/RT/Templates.pm
index 97b37c5..6a99c1d 100755
--- a/lib/RT/Templates.pm
+++ b/lib/RT/Templates.pm
@@ -75,8 +75,7 @@ package RT::Templates;
use RT::SearchBuilder;
use RT::Template;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index edf38f0..f43cea1 100755
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -73,8 +73,7 @@ use RT::Record;
use RT::Queue;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/Tickets.pm b/lib/RT/Tickets.pm
index b3a84ae..43ca094 100755
--- a/lib/RT/Tickets.pm
+++ b/lib/RT/Tickets.pm
@@ -75,8 +75,7 @@ package RT::Tickets;
use RT::SearchBuilder;
use RT::Ticket;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/Transaction.pm b/lib/RT/Transaction.pm
index bc2b5cd..c64408b 100755
--- a/lib/RT/Transaction.pm
+++ b/lib/RT/Transaction.pm
@@ -72,8 +72,7 @@ package RT::Transaction;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/Transactions.pm b/lib/RT/Transactions.pm
index 0b977c6..01ff808 100755
--- a/lib/RT/Transactions.pm
+++ b/lib/RT/Transactions.pm
@@ -75,8 +75,7 @@ package RT::Transactions;
use RT::SearchBuilder;
use RT::Transaction;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
index b7ebd5b..3f0321c 100755
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@ -72,8 +72,7 @@ package RT::User;
use RT::Record;
-use vars qw( @ISA );
- at ISA= qw( RT::Record );
+use base qw( RT::Record );
sub _Init {
my $self = shift;
diff --git a/lib/RT/Users.pm b/lib/RT/Users.pm
index f0f07fd..f03bef0 100755
--- a/lib/RT/Users.pm
+++ b/lib/RT/Users.pm
@@ -75,8 +75,7 @@ package RT::Users;
use RT::SearchBuilder;
use RT::User;
-use vars qw( @ISA );
- at ISA= qw(RT::SearchBuilder);
+use base qw(RT::SearchBuilder);
sub _Init {
commit 43a418fb49c8cd6a11ab4d8bddb2694cd6ae7e83
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jul 7 19:16:44 2011 -0400
Move run-time setting of @ISA to compile-time, by way of "use base" equivalent
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 3d28fab..86b8bf0 100755
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -74,13 +74,17 @@ use Encode qw();
our $_TABLE_ATTR = { };
use RT::Base;
-my $base = 'DBIx::SearchBuilder::Record::Cachable';
-if ( $RT::Config && $RT::Config->Get('DontCacheSearchBuilderRecords') ) {
- $base = 'DBIx::SearchBuilder::Record';
+
+BEGIN {
+ my $base = 'DBIx::SearchBuilder::Record::Cachable';
+ if ( $RT::Config && $RT::Config->Get('DontCacheSearchBuilderRecords') ) {
+ $base = 'DBIx::SearchBuilder::Record';
+ }
+
+ eval "require $base" or die $@;
+ require base;
+ base->import('RT::Base', $base);
}
-eval "require $base" or die $@;
-our @ISA = 'RT::Base';
-push @ISA, $base;
# {{{ sub _Init
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list