[Rt-commit] rtir branch, 2.6/perlcritic, updated. 2.6.0-46-gc58d56e
Alex Vandiver
alexmv at bestpractical.com
Mon Aug 29 18:58:03 EDT 2011
The branch, 2.6/perlcritic has been updated
via c58d56e44fa4c8abe0703a037cc9a3a5821b7216 (commit)
via 6bcf6c3fc8a0bd211932b0cd9d2c8fbf54f35c18 (commit)
via 7e059826134451e231854de2d3b58f5f79699698 (commit)
via 5c6f572bf9d000ace6e2d9929498b186862f47c0 (commit)
via ec5a28873c6345a2913cfb7537a7b3a9996a3cd9 (commit)
via 311b9caa3ddf3bd02991a9117baaaf0ce48b45fe (commit)
from 0a0740311d2ff51c1d04538556a1785562b71ced (commit)
Summary of changes:
etc/RTIR_Config.pm | 2 +
etc/add_constituency | 1 +
etc/upgrade/upgrade.pl | 4 +-
lib/RT/Action/RTIR.pm | 8 ++--
lib/RT/Action/RTIR_ChangeChildOwnership.pm | 7 +--
lib/RT/Action/RTIR_ChangeParentOwnership.pm | 7 +--
lib/RT/Action/RTIR_FindIP.pm | 5 +-
lib/RT/Action/RTIR_MergeIPs.pm | 6 +--
lib/RT/Action/RTIR_OpenParent.pm | 6 +--
lib/RT/Action/RTIR_ResolveChildren.pm | 11 ++--
lib/RT/Action/RTIR_SetBlockState.pm | 8 +--
lib/RT/Action/RTIR_SetConstituency.pm | 6 +--
lib/RT/Action/RTIR_SetConstituencyGroup.pm | 8 +--
lib/RT/Action/RTIR_SetDueBySLA.pm | 8 +--
lib/RT/Action/RTIR_SetDueCorrespond.pm | 8 +--
lib/RT/Action/RTIR_SetDueIncident.pm | 7 ++-
lib/RT/Action/RTIR_SetDueReopen.pm | 11 ++--
lib/RT/Action/RTIR_SetDueToNow.pm | 9 +--
lib/RT/Action/RTIR_SetHowReported.pm | 8 +--
lib/RT/Action/RTIR_SetIncidentReportState.pm | 6 +--
lib/RT/Action/RTIR_SetIncidentResolution.pm | 8 +--
lib/RT/Action/RTIR_SetIncidentState.pm | 8 +--
lib/RT/Action/RTIR_SetInvestigationState.pm | 6 +--
lib/RT/Action/RTIR_SetStartedToNow.pm | 8 +--
lib/RT/Action/RTIR_SetStartsByBizHours.pm | 8 +--
lib/RT/Action/RTIR_SetStartsToNow.pm | 8 +--
lib/RT/Action/RTIR_SetState.pm | 6 +--
lib/RT/Action/RTIR_UnsetDue.pm | 8 +--
lib/RT/Condition/RTIR.pm | 6 +-
lib/RT/Condition/RTIR_BlockActivation.pm | 7 +--
lib/RT/Condition/RTIR_CloseTicket.pm | 8 +--
lib/RT/Condition/RTIR_CustomerResponse.pm | 6 +--
lib/RT/Condition/RTIR_LinkingToIncident.pm | 6 +--
lib/RT/Condition/RTIR_Merge.pm | 6 +--
lib/RT/Condition/RTIR_ReopenTicket.pm | 8 +--
lib/RT/Condition/RTIR_RequireConstituencyChange.pm | 6 +--
.../RTIR_RequireConstituencyGroupChange.pm | 7 +--
lib/RT/Condition/RTIR_RequireDueChange.pm | 9 +--
lib/RT/Condition/RTIR_RequireStateChange.pm | 7 +--
lib/RT/Condition/RTIR_StaffResponse.pm | 8 +--
lib/RT/IR.pm | 36 ++++++++------
lib/RT/IR/Test.pm | 3 +-
lib/RT/IR/Test/Web.pm | 52 +------------------
lib/RT/IR/Ticket.pm | 3 +-
44 files changed, 118 insertions(+), 256 deletions(-)
- Log -----------------------------------------------------------------
commit 311b9caa3ddf3bd02991a9117baaaf0ce48b45fe
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 29 17:36:39 2011 -0400
Use something not string eval to load local overlays
diff --git a/lib/RT/Action/RTIR_ChangeChildOwnership.pm b/lib/RT/Action/RTIR_ChangeChildOwnership.pm
index 3cdd534..7076c0d 100644
--- a/lib/RT/Action/RTIR_ChangeChildOwnership.pm
+++ b/lib/RT/Action/RTIR_ChangeChildOwnership.pm
@@ -103,9 +103,6 @@ sub Commit {
# }}}
-eval "require RT::Action::RTIR_ChangeChildOwnership_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_ChangeChildOwnership_Vendor.pm});
-eval "require RT::Action::RTIR_ChangeChildOwnership_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_ChangeChildOwnership_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_ChangeParentOwnership.pm b/lib/RT/Action/RTIR_ChangeParentOwnership.pm
index 7fd0fac..a4fbe8a 100644
--- a/lib/RT/Action/RTIR_ChangeParentOwnership.pm
+++ b/lib/RT/Action/RTIR_ChangeParentOwnership.pm
@@ -93,9 +93,6 @@ sub Commit {
# }}}
-eval "require RT::Action::RTIR_ChangeParentOwnership_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_ChangeParentOwnership_Vendor.pm});
-eval "require RT::Action::RTIR_ChangeParentOwnership_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_ChangeParentOwnership_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_FindIP.pm b/lib/RT/Action/RTIR_FindIP.pm
index f3872d9..8af8ab3 100644
--- a/lib/RT/Action/RTIR_FindIP.pm
+++ b/lib/RT/Action/RTIR_FindIP.pm
@@ -88,4 +88,6 @@ sub AddIP {
return 1;
}
+RT::IR->ImportOverlays;
+
1;
diff --git a/lib/RT/Action/RTIR_MergeIPs.pm b/lib/RT/Action/RTIR_MergeIPs.pm
index dc44228..4097af2 100644
--- a/lib/RT/Action/RTIR_MergeIPs.pm
+++ b/lib/RT/Action/RTIR_MergeIPs.pm
@@ -55,9 +55,6 @@ sub Commit {
return 1;
}
-eval "require RT::Action::RTIR_MergeIPs_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_MergeIPs_Vendor.pm});
-eval "require RT::Action::RTIR_MergeIPs_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_MergeIPs_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_OpenParent.pm b/lib/RT/Action/RTIR_OpenParent.pm
index 78d2e29..e7e471c 100644
--- a/lib/RT/Action/RTIR_OpenParent.pm
+++ b/lib/RT/Action/RTIR_OpenParent.pm
@@ -95,9 +95,6 @@ sub Commit {
# }}}
-eval "require RT::Action::RTIR_OpenParent_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_OpenParent_Vendor.pm});
-eval "require RT::Action::RTIR_OpenParent_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_OpenParent_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_ResolveChildren.pm b/lib/RT/Action/RTIR_ResolveChildren.pm
index 203facb..a3c87df 100644
--- a/lib/RT/Action/RTIR_ResolveChildren.pm
+++ b/lib/RT/Action/RTIR_ResolveChildren.pm
@@ -106,9 +106,6 @@ END
# }}}
-eval "require RT::Action::RTIR_ResolveChildren_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_ResolveChildren_Vendor.pm});
-eval "require RT::Action::RTIR_ResolveChildren_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_ResolveChildren_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetBlockState.pm b/lib/RT/Action/RTIR_SetBlockState.pm
index c297edf..e79c732 100644
--- a/lib/RT/Action/RTIR_SetBlockState.pm
+++ b/lib/RT/Action/RTIR_SetBlockState.pm
@@ -119,9 +119,6 @@ sub GetState {
return '';
}
-eval "require RT::Action::RTIR_SetBlockState_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetBlockState_Vendor.pm});
-eval "require RT::Action::RTIR_SetBlockState_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetBlockState_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetConstituency.pm b/lib/RT/Action/RTIR_SetConstituency.pm
index ec129ec..237a94c 100644
--- a/lib/RT/Action/RTIR_SetConstituency.pm
+++ b/lib/RT/Action/RTIR_SetConstituency.pm
@@ -174,9 +174,6 @@ sub IsValidConstituency {
}
-eval "require RT::Action::RTIR_SetConstituency_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetConstituency_Vendor.pm});
-eval "require RT::Action::RTIR_SetConstituency_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetConstituency_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetConstituencyGroup.pm b/lib/RT/Action/RTIR_SetConstituencyGroup.pm
index 223f776..ef547c7 100644
--- a/lib/RT/Action/RTIR_SetConstituencyGroup.pm
+++ b/lib/RT/Action/RTIR_SetConstituencyGroup.pm
@@ -82,10 +82,7 @@ sub ConstituencyValues {
}
-eval "require RT::Action::RTIR_SetConstituencyGroup_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetConstituencyGroup_Vendor.pm});
-eval "require RT::Action::RTIR_SetConstituencyGroup_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetConstituencyGroup_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetDueBySLA.pm b/lib/RT/Action/RTIR_SetDueBySLA.pm
index ad74e37..1930ec4 100644
--- a/lib/RT/Action/RTIR_SetDueBySLA.pm
+++ b/lib/RT/Action/RTIR_SetDueBySLA.pm
@@ -106,9 +106,6 @@ sub Commit {
# }}}
-eval "require RT::Action::RTIR_SetDueBySLA_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetDueBySLA_Vendor.pm});
-eval "require RT::Action::RTIR_SetDueBySLA_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetDueBySLA_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetDueCorrespond.pm b/lib/RT/Action/RTIR_SetDueCorrespond.pm
index f4f649f..407e794 100644
--- a/lib/RT/Action/RTIR_SetDueCorrespond.pm
+++ b/lib/RT/Action/RTIR_SetDueCorrespond.pm
@@ -93,9 +93,6 @@ sub Commit {
# }}}
-eval "require RT::Action::RTIR_SetDueCorrespond_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetDueCorrespond_Vendor.pm});
-eval "require RT::Action::RTIR_SetDueCorrespond_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetDueCorrespond_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetDueIncident.pm b/lib/RT/Action/RTIR_SetDueIncident.pm
index fc0426b..d2736a2 100644
--- a/lib/RT/Action/RTIR_SetDueIncident.pm
+++ b/lib/RT/Action/RTIR_SetDueIncident.pm
@@ -117,4 +117,6 @@ sub UpdateDue {
# }}}
+RT::IR->ImportOverlays;
+
1;
diff --git a/lib/RT/Action/RTIR_SetDueReopen.pm b/lib/RT/Action/RTIR_SetDueReopen.pm
index f7703bf..0355f2e 100644
--- a/lib/RT/Action/RTIR_SetDueReopen.pm
+++ b/lib/RT/Action/RTIR_SetDueReopen.pm
@@ -96,9 +96,6 @@ sub Commit {
# }}}
-eval "require RT::Action::RTIR_SetDueReopen_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetDueReopen_Vendor.pm});
-eval "require RT::Action::RTIR_SetDueReopen_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetDueReopen_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetDueToNow.pm b/lib/RT/Action/RTIR_SetDueToNow.pm
index 08114da..3e11676 100644
--- a/lib/RT/Action/RTIR_SetDueToNow.pm
+++ b/lib/RT/Action/RTIR_SetDueToNow.pm
@@ -98,9 +98,6 @@ sub Commit {
return 1;
}
-eval "require RT::Action::RTIR_SetDueToNow_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetDueToNow_Vendor.pm});
-eval "require RT::Action::RTIR_SetDueToNow_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetDueToNow_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetHowReported.pm b/lib/RT/Action/RTIR_SetHowReported.pm
index e364450..4d33af0 100644
--- a/lib/RT/Action/RTIR_SetHowReported.pm
+++ b/lib/RT/Action/RTIR_SetHowReported.pm
@@ -85,9 +85,6 @@ sub Commit {
# }}}
-eval "require RT::Action::RTIR_SetHowReported_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetHowReported_Vendor.pm});
-eval "require RT::Action::RTIR_SetHowReported_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetHowReported_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetIncidentReportState.pm b/lib/RT/Action/RTIR_SetIncidentReportState.pm
index da7662b..3d9e36d 100644
--- a/lib/RT/Action/RTIR_SetIncidentReportState.pm
+++ b/lib/RT/Action/RTIR_SetIncidentReportState.pm
@@ -78,9 +78,6 @@ sub GetState {
return '';
}
-eval "require RT::Action::RTIR_SetIncidentReportState_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetIncidentReportState_Vendor.pm});
-eval "require RT::Action::RTIR_SetIncidentReportState_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetIncidentReportState_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetIncidentResolution.pm b/lib/RT/Action/RTIR_SetIncidentResolution.pm
index db3c04c..ffdaac0 100644
--- a/lib/RT/Action/RTIR_SetIncidentResolution.pm
+++ b/lib/RT/Action/RTIR_SetIncidentResolution.pm
@@ -48,10 +48,7 @@ sub Commit {
return 1;
}
-eval "require RT::Action::RTIR_SetIncidentResolution_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetIncidentResolution_Vendor.pm});
-eval "require RT::Action::RTIR_SetIncidentResolution_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetIncidentResolution_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetIncidentState.pm b/lib/RT/Action/RTIR_SetIncidentState.pm
index fc623cc..2fba1bd 100644
--- a/lib/RT/Action/RTIR_SetIncidentState.pm
+++ b/lib/RT/Action/RTIR_SetIncidentState.pm
@@ -67,9 +67,6 @@ sub GetState {
return $state{ $self->TicketObj->Status };
}
-eval "require RT::Action::RTIR_SetIncidentState_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetIncidentState_Vendor.pm});
-eval "require RT::Action::RTIR_SetIncidentState_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetIncidentState_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetInvestigationState.pm b/lib/RT/Action/RTIR_SetInvestigationState.pm
index e5a1181..51fa101 100644
--- a/lib/RT/Action/RTIR_SetInvestigationState.pm
+++ b/lib/RT/Action/RTIR_SetInvestigationState.pm
@@ -69,9 +69,6 @@ sub GetState {
return $state{ $self->TicketObj->Status } || '';
}
-eval "require RT::Action::RTIR_SetInvestigationState_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetInvestigationState_Vendor.pm});
-eval "require RT::Action::RTIR_SetInvestigationState_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetInvestigationState_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetStartedToNow.pm b/lib/RT/Action/RTIR_SetStartedToNow.pm
index 6855f99..2fb2e3b 100644
--- a/lib/RT/Action/RTIR_SetStartedToNow.pm
+++ b/lib/RT/Action/RTIR_SetStartedToNow.pm
@@ -30,9 +30,6 @@ sub Commit {
return 1;
}
-eval "require RT::Action::RTIR_SetStartedToNow_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetStartedToNow_Vendor.pm});
-eval "require RT::Action::RTIR_SetStartedToNow_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetStartedToNow_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetStartsByBizHours.pm b/lib/RT/Action/RTIR_SetStartsByBizHours.pm
index d267511..0c5190a 100644
--- a/lib/RT/Action/RTIR_SetStartsByBizHours.pm
+++ b/lib/RT/Action/RTIR_SetStartsByBizHours.pm
@@ -85,9 +85,6 @@ sub Commit {
return 1;
}
-eval "require RT::Action::RTIR_SetStartsByBizHours_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetStartsByBizHours_Vendor.pm});
-eval "require RT::Action::RTIR_SetStartsByBizHours_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetStartsByBizHours_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetStartsToNow.pm b/lib/RT/Action/RTIR_SetStartsToNow.pm
index dd7e2e6..2e299e0 100644
--- a/lib/RT/Action/RTIR_SetStartsToNow.pm
+++ b/lib/RT/Action/RTIR_SetStartsToNow.pm
@@ -87,9 +87,6 @@ sub Commit {
return 1;
}
-eval "require RT::Action::RTIR_SetStartsToNow_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetStartsToNow_Vendor.pm});
-eval "require RT::Action::RTIR_SetStartsToNow_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetStartsToNow_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_SetState.pm b/lib/RT/Action/RTIR_SetState.pm
index 8802394..48349b4 100644
--- a/lib/RT/Action/RTIR_SetState.pm
+++ b/lib/RT/Action/RTIR_SetState.pm
@@ -45,9 +45,6 @@ sub Commit {
sub GetState { return '' }
-eval "require RT::Action::RTIR_SetState_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetState_Vendor.pm});
-eval "require RT::Action::RTIR_SetState_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_SetState_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Action/RTIR_UnsetDue.pm b/lib/RT/Action/RTIR_UnsetDue.pm
index 8cac0fe..967f082 100644
--- a/lib/RT/Action/RTIR_UnsetDue.pm
+++ b/lib/RT/Action/RTIR_UnsetDue.pm
@@ -77,9 +77,6 @@ sub Commit {
return 1;
}
-eval "require RT::Action::RTIR_UnsetDue_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_UnsetDue_Vendor.pm});
-eval "require RT::Action::RTIR_UnsetDue_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/RTIR_UnsetDue_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_BlockActivation.pm b/lib/RT/Condition/RTIR_BlockActivation.pm
index a3269f0..d004ba7 100644
--- a/lib/RT/Condition/RTIR_BlockActivation.pm
+++ b/lib/RT/Condition/RTIR_BlockActivation.pm
@@ -38,9 +38,6 @@ sub IsApplicable {
return 0;
}
-eval "require RT::Condition::RTIR_BlockActivation_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_BlockActivation_Vendor.pm});
-eval "require RT::Condition::RTIR_BlockActivation_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_BlockActivation_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_CloseTicket.pm b/lib/RT/Condition/RTIR_CloseTicket.pm
index d6220b9..6944b08 100644
--- a/lib/RT/Condition/RTIR_CloseTicket.pm
+++ b/lib/RT/Condition/RTIR_CloseTicket.pm
@@ -72,10 +72,7 @@ sub IsApplicable {
return 1;
}
-eval "require RT::Condition::RTIR_CloseTicket_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_CloseTicket_Vendor.pm});
-eval "require RT::Condition::RTIR_CloseTicket_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_CloseTicket_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_CustomerResponse.pm b/lib/RT/Condition/RTIR_CustomerResponse.pm
index cd4030a..4e54274 100644
--- a/lib/RT/Condition/RTIR_CustomerResponse.pm
+++ b/lib/RT/Condition/RTIR_CustomerResponse.pm
@@ -75,9 +75,6 @@ sub IsApplicable {
return !$self->IsStaff;
}
-eval "require RT::Condition::RTIR_CustomerResponse_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_CustomerResponse_Vendor.pm});
-eval "require RT::Condition::RTIR_CustomerResponse_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_CustomerResponse_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_LinkingToIncident.pm b/lib/RT/Condition/RTIR_LinkingToIncident.pm
index f8aebc7..066ef68 100644
--- a/lib/RT/Condition/RTIR_LinkingToIncident.pm
+++ b/lib/RT/Condition/RTIR_LinkingToIncident.pm
@@ -38,9 +38,6 @@ sub IsApplicable {
return 0;
}
-eval "require RT::Condition::RTIR_LinkingToIncident_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_LinkingToIncident_Vendor.pm});
-eval "require RT::Condition::RTIR_LinkingToIncident_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_LinkingToIncident_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_Merge.pm b/lib/RT/Condition/RTIR_Merge.pm
index 0cfa20e..ae5749a 100644
--- a/lib/RT/Condition/RTIR_Merge.pm
+++ b/lib/RT/Condition/RTIR_Merge.pm
@@ -20,9 +20,6 @@ sub IsApplicable {
return 1;
}
-eval "require RT::Condition::RTIR_Merge_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_Merge_Vendor.pm});
-eval "require RT::Condition::RTIR_Merge_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_Merge_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_ReopenTicket.pm b/lib/RT/Condition/RTIR_ReopenTicket.pm
index 61c4731..46061e3 100644
--- a/lib/RT/Condition/RTIR_ReopenTicket.pm
+++ b/lib/RT/Condition/RTIR_ReopenTicket.pm
@@ -70,10 +70,7 @@ sub IsApplicable {
return 1;
}
-eval "require RT::Condition::RTIR_ReopenTicket_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_ReopenTicket_Vendor.pm});
-eval "require RT::Condition::RTIR_ReopenTicket_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_ReopenTicket_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_RequireConstituencyChange.pm b/lib/RT/Condition/RTIR_RequireConstituencyChange.pm
index d8a539d..4707598 100644
--- a/lib/RT/Condition/RTIR_RequireConstituencyChange.pm
+++ b/lib/RT/Condition/RTIR_RequireConstituencyChange.pm
@@ -27,10 +27,7 @@ sub IsApplicable {
return 0;
}
-eval "require RT::Condition::RTIR_RequireConstituencyChange_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_RequireConstituencyChange_Vendor.pm});
-eval "require RT::Condition::RTIR_RequireConstituencyChange_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_RequireConstituencyChange_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_RequireConstituencyGroupChange.pm b/lib/RT/Condition/RTIR_RequireConstituencyGroupChange.pm
index 0eb6475..762093b 100644
--- a/lib/RT/Condition/RTIR_RequireConstituencyGroupChange.pm
+++ b/lib/RT/Condition/RTIR_RequireConstituencyGroupChange.pm
@@ -27,9 +27,6 @@ sub IsApplicable {
return 0;
}
-eval "require RT::Condition::RTIR_RequireConstituencyGroupChange_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_RequireConstituencyGroupChange_Vendor.pm});
-eval "require RT::Condition::RTIR_RequireConstituencyGroupChange_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_RequireConstituencyGroupChange_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_RequireDueChange.pm b/lib/RT/Condition/RTIR_RequireDueChange.pm
index 8fd7121..6a0a8e1 100644
--- a/lib/RT/Condition/RTIR_RequireDueChange.pm
+++ b/lib/RT/Condition/RTIR_RequireDueChange.pm
@@ -69,10 +69,7 @@ sub IsApplicable {
return 0;
}
-eval "require RT::Condition::RTIR_RequireDueChange_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_RequireDueChange_Vendor.pm});
-eval "require RT::Condition::RTIR_RequireDueChange_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_RequireDueChange_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_RequireStateChange.pm b/lib/RT/Condition/RTIR_RequireStateChange.pm
index 78b41bb..31bc58a 100644
--- a/lib/RT/Condition/RTIR_RequireStateChange.pm
+++ b/lib/RT/Condition/RTIR_RequireStateChange.pm
@@ -78,10 +78,7 @@ sub IsApplicable {
return 0;
}
-eval "require RT::Condition::RTIR_RequireStateChange_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_RequireStateChange_Vendor.pm});
-eval "require RT::Condition::RTIR_RequireStateChange_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_RequireStateChange_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/Condition/RTIR_StaffResponse.pm b/lib/RT/Condition/RTIR_StaffResponse.pm
index 67d01b7..7023526 100644
--- a/lib/RT/Condition/RTIR_StaffResponse.pm
+++ b/lib/RT/Condition/RTIR_StaffResponse.pm
@@ -70,10 +70,7 @@ sub IsApplicable {
return $self->IsStaff;
}
-eval "require RT::Condition::RTIR_StaffResponse_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_StaffResponse_Vendor.pm});
-eval "require RT::Condition::RTIR_StaffResponse_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/RTIR_StaffResponse_Local.pm});
+RT::IR->ImportOverlays;
1;
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 3ac2e19..51ced46 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -661,11 +661,19 @@ if ( RT::IR->HasConstituency ) {
};
}
-#
-eval "require RT::IR_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/IR_Vendor.pm});
-eval "require RT::IR_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/IR_Local.pm});
+sub ImportOverlays {
+ my $class = shift;
+ my ($package,undef,undef) = caller();
+ $package =~ s|::|/|g;
+ for my $type (qw(Overlay Vendor Local)) {
+ my $filename = $package."_".$type.".pm";
+ eval { require $filename };
+ die $@ if ($@ && $@ !~ qr{^Can't locate $filename});
+ }
+ return;
+}
+
+__PACKAGE__->ImportOverlays();
package RT::ObjectCustomFieldValue;
@@ -693,5 +701,4 @@ sub LoadByCols {
return $self->SUPER::LoadByCols( %args, Content => $sIP, LargeContent => $eIP );
}
-
1;
commit ec5a28873c6345a2913cfb7537a7b3a9996a3cd9
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 29 18:21:08 2011 -0400
Remove never-used merge_ticket sub
diff --git a/lib/RT/IR/Test/Web.pm b/lib/RT/IR/Test/Web.pm
index f0655f6..71a401e 100644
--- a/lib/RT/IR/Test/Web.pm
+++ b/lib/RT/IR/Test/Web.pm
@@ -275,51 +275,6 @@ sub LinkChildToIncident {
return;
}
-
-sub merge_ticket {
- my $self = shift;
- my $id = shift;
- my $id_to_merge_to = shift;
-
- $self->display_ticket( $id);
-
- $self->timeout(600);
-
- $self->follow_link_ok({text => 'Merge', n => '1'}, "Followed 'Merge' link");
-
- my ($type) = $self->content() =~ /Merge ([\w ]+) #$id:/i;
- $type ||= 'Ticket';
-
-
- # Check that the desired incident occurs in the list of available incidents; if not, keep
- # going to the next page until you find it (or get to the last page and don't find it,
- # whichever comes first)
- while($self->content() !~ m|<a href="/Ticket/Display.html\?id=$id_to_merge_to">$id_to_merge_to</a>|) {
- my @ids = sort map s|<b>\s*<a href="/Ticket/Display.html?id=(\d+)">\1</a>\s*</b>|$1|, split /<td/, $self->content();
- my $max = pop @ids;
- my $url = "Merge.html?id=$id&Order=ASC&Query=( 'CF.{State}' = 'new' OR 'CF.{State}' = 'open' AND 'id' > $max)";
- my $weburl = RT->Config->Get('WebURL');
- Test::More::diag("IDs found: " . join ', ', @ids);
- Test::More::diag("Max ID: " . $max);
- Test::More::diag ("URL: " . $url);
- $self->get("$weburl/RTIR/$url");
- last unless $self->content() =~ qr|<b>\s*<a href="/Ticket/Display.html?id=(\d+)">\1</a>\s*</b>|sm;
- }
-
-
- $self->form_number(3);
-
-
- $self->field("SelectedTicket", $id_to_merge_to);
- $self->click_button(value => 'Merge');
-
- Test::More::is ($self->status, 200, "Attempting to merge $type #$id to ticket #$id_to_merge_to");
-
- return $self->content_like(qr{.*<ul class="action-results">\s*<li>Merge Successful</li>.*}i,
- "Successfully merged $type #$id to ticket #$id_to_merge_to");
-}
-
-
sub create_incident_and_investigation {
my $self = shift;
my $fields = shift || {};
commit 5c6f572bf9d000ace6e2d9929498b186862f47c0
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 29 17:47:59 2011 -0400
Use blockless map and grep blocks
diff --git a/etc/upgrade/upgrade.pl b/etc/upgrade/upgrade.pl
index 2cee638..3732613 100644
--- a/etc/upgrade/upgrade.pl
+++ b/etc/upgrade/upgrade.pl
@@ -27,7 +27,7 @@ my $current_user = GetCurrentUser();
my $incidents = RT::Tickets->new( $current_user );
my $incidents_query =
"Queue = 'Incidents' AND Due <= '1970-01-02'"
- ." AND ( ". join( ' OR ', map "Status = '$_'", RT::Queue->ActiveStatusArray() ) ." )";
+ ." AND ( ". join( ' OR ', map { "Status = '$_'" } RT::Queue->ActiveStatusArray() ) ." )";
$incidents->FromSQL( $incidents_query );
print "\n\nGoing to update due dates of Incidents where it's not set\n";
@@ -35,7 +35,7 @@ print "\n\nGoing to update due dates of Incidents where it's not set\n";
print "Query for incidents: $incidents_query\n\n";
my $base_query = "( Queue = 'Incident Reports' OR Queue = 'Investigations' OR Queue = 'Blocks' )"
- ." AND ( ". join( ' OR ', map "Status = '$_'", RT::Queue->ActiveStatusArray() ) ." )"
+ ." AND ( ". join( ' OR ', map { "Status = '$_'" } RT::Queue->ActiveStatusArray() ) ." )"
." AND Due > '1970-01-02'";
print "Base query for children: $base_query\n\n";
diff --git a/lib/RT/Action/RTIR_FindIP.pm b/lib/RT/Action/RTIR_FindIP.pm
index 8af8ab3..167096d 100644
--- a/lib/RT/Action/RTIR_FindIP.pm
+++ b/lib/RT/Action/RTIR_FindIP.pm
@@ -62,7 +62,7 @@ sub Commit {
# but 0.0.0.0/0 is legal CIDR
my @CIDRs = ( $content =~ /(?<![0-9.])$RE{net}{CIDR}{IPv4}{-keep}(?!\.?[0-9])/go );
while ( my ($addr, $bits) = splice @CIDRs, 0, 2 ) {
- my $cidr = join( '.', map $_||0, (split /\./, $addr)[0..3] ) ."/$bits";
+ my $cidr = join( '.', map { $_||0 } (split /\./, $addr)[0..3] ) ."/$bits";
my $range = (Net::CIDR::cidr2range( $cidr ))[0] or next;
$spots_left -= $self->AddIP(
IP => $range, CustomField => $cf, Skip => \%existing
diff --git a/lib/RT/Action/RTIR_ResolveChildren.pm b/lib/RT/Action/RTIR_ResolveChildren.pm
index a3c87df..1448835 100644
--- a/lib/RT/Action/RTIR_ResolveChildren.pm
+++ b/lib/RT/Action/RTIR_ResolveChildren.pm
@@ -62,7 +62,7 @@ sub Prepare {
my @inactive = $self->TicketObj->QueueObj->InactiveStatusArray;
my $new_status = $self->TransactionObj->NewValue;
- return 0 unless grep $_ eq $new_status, @inactive;
+ return 0 unless grep { $_ eq $new_status } @inactive;
return 1;
}
@@ -84,7 +84,7 @@ sub Commit {
.") AND MemberOf = " . $id
." AND ("
# TODO: move to per queue statuses lists
- . join(" AND ", map "Status != '$_'", RT->Config->Get('InactiveStatus') )
+ . join(" AND ", map { "Status != '$_'" } RT->Config->Get('InactiveStatus') )
.")";
my $members = RT::Tickets->new( $self->TransactionObj->CurrentUser );
diff --git a/lib/RT/Action/RTIR_SetConstituencyGroup.pm b/lib/RT/Action/RTIR_SetConstituencyGroup.pm
index ef547c7..adc1ab0 100644
--- a/lib/RT/Action/RTIR_SetConstituencyGroup.pm
+++ b/lib/RT/Action/RTIR_SetConstituencyGroup.pm
@@ -75,7 +75,7 @@ sub ConstituencyValues {
$RT::Logger->crit("Couldn't load constituency field");
return 0;
}
- @constituencies = map $_->Name, @{ $cf->Values->ItemsArrayRef };
+ @constituencies = map { $_->Name } @{ $cf->Values->ItemsArrayRef };
}
return @constituencies;
}
diff --git a/lib/RT/Action/RTIR_SetDueIncident.pm b/lib/RT/Action/RTIR_SetDueIncident.pm
index d2736a2..6c93d71 100644
--- a/lib/RT/Action/RTIR_SetDueIncident.pm
+++ b/lib/RT/Action/RTIR_SetDueIncident.pm
@@ -102,7 +102,7 @@ sub UpdateDue {
." OR Queue = 'Blocks'"
.") AND MemberOf = " . $incident->Id
." AND ("
- . join( " OR ", map "Status = '$_'", RT->Config->Get('ActiveStatus') )
+ . join( " OR ", map { "Status = '$_'" } RT->Config->Get('ActiveStatus') )
.")";
my $children = RT::Tickets->new($self->CurrentUser);
$children->FromSQL( $query );
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 51ced46..3556c88 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -214,7 +214,7 @@ sub States {
}
my %seen = ();
- @states = sort grep !$seen{$_}++, @states;
+ @states = sort grep { !$seen{$_}++ } @states;
return @states;
}
@@ -269,14 +269,14 @@ sub CustomFields {
if ( $type ) {
@list = (@{ $cache{'Global'} }, @{ $cache{$type} });
} else {
- @list = (@{ $cache{'Global'} }, map @$_, @cache{values %TYPE});
+ @list = (@{ $cache{'Global'} }, map { @$_ } @cache{values %TYPE});
}
if ( my $field = $arg{'Field'} ) {
if ( $field =~ /\D/ ) {
- @list = grep lc $_->Name eq lc $field, @list;
+ @list = grep { lc $_->Name eq lc $field } @list;
} else {
- @list = grep $_->id == $field, @list;
+ @list = grep { $_->id == $field } @list;
}
}
@@ -309,7 +309,7 @@ sub DefaultConstituency {
push @values, substr $pqueue->__Value('Name'), length("$name - ");
}
my $default = RT->Config->Get('RTIR_CustomFieldsDefaults')->{'Constituency'} || '';
- return $default if grep lc $_ eq lc $default, @values;
+ return $default if grep { lc $_ eq lc $default } @values;
return shift @values;
}
@@ -327,7 +327,7 @@ sub ParseIPRange {
my $arg = shift or return ();
if ( $arg =~ /^\s*$RE{net}{CIDR}{IPv4}{-keep}\s*$/go ) {
- my $cidr = join( '.', map $_||0, (split /\./, $1)[0..3] ) ."/$2";
+ my $cidr = join( '.', map { $_||0 } (split /\./, $1)[0..3] ) ."/$2";
$arg = (Net::CIDR::cidr2range( $cidr ))[0] || $arg;
}
@@ -409,7 +409,7 @@ wrap 'RT::Tickets::_CustomFieldLimit',
pre => sub {
return unless $_[3] =~ /^\s*$RE{net}{CIDR}{IPv4}{-keep}\s*$/o;
# convert incomplete 192.168/24 to 192.168.0.0/24 format
- my $cidr = join( '.', map $_||0, (split /\./, $1)[0..3] ) ."/$2";
+ my $cidr = join( '.', map { $_||0 } (split /\./, $1)[0..3] ) ."/$2";
# convert to range and continue, it will be catched by next wrapper
$_[3] = (Net::CIDR::cidr2range( $cidr ))[0] || $_[3];
};
@@ -645,7 +645,7 @@ if ( RT::IR->HasConstituency ) {
if ( $tmp ) {
chomp $tmp;
$tmp = undef unless
- grep lc $_->Name eq lc $tmp, @{ $cf->Values->ItemsArrayRef };
+ grep { lc $_->Name eq lc $tmp } @{ $cf->Values->ItemsArrayRef };
}
$value = $tmp;
$RT::Logger->debug("Found Constituency '$tmp' in email") if $tmp;
diff --git a/lib/RT/IR/Test/Web.pm b/lib/RT/IR/Test/Web.pm
index 71a401e..62eaf7f 100644
--- a/lib/RT/IR/Test/Web.pm
+++ b/lib/RT/IR/Test/Web.pm
@@ -165,8 +165,8 @@ sub custom_field_input {
my $cf_id = $cf_obj->id;
my ($res) =
- grep /^Object-RT::Ticket-\d*-CustomField-$cf_id-Values?$/,
- map $_->name,
+ grep { /^Object-RT::Ticket-\d*-CustomField-$cf_id-Values?$/ }
+ map { $_->name }
$self->current_form->inputs;
unless ( $res ) {
Test::More::diag("Can not find input for custom field '$cf_name' #$cf_id");
@@ -369,7 +369,7 @@ sub bulk_abandon {
my $self = shift;
my @to_abandon = @_;
- Test::More::diag "going to bulk abandon incidents " . join ',', map "#$_",
+ Test::More::diag "going to bulk abandon incidents " . join ',', map { "#$_" }
@to_abandon
if $ENV{'TEST_VERBOSE'};
diff --git a/lib/RT/IR/Ticket.pm b/lib/RT/IR/Ticket.pm
index 6f6210e..626d460 100644
--- a/lib/RT/IR/Ticket.pm
+++ b/lib/RT/IR/Ticket.pm
@@ -41,7 +41,7 @@ sub IsLinkedToActiveIncidents {
my $query = "Queue = 'Incidents'"
." AND HasMember = ". $child->id
- ." AND ( ". join(" OR ", map "Status = '$_'", RT->Config->Get('ActiveStatus') ) ." ) ";
+ ." AND ( ". join(" OR ", map {"Status = '$_'"} RT->Config->Get('ActiveStatus') ) ." ) ";
$query .= " AND id != ". $parent->Id if $parent;
commit 7e059826134451e231854de2d3b58f5f79699698
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 29 18:32:41 2011 -0400
Standardize use strict/warnings/base header somewhat
diff --git a/lib/RT/Action/RTIR.pm b/lib/RT/Action/RTIR.pm
index 0f6a976..8f05aa3 100644
--- a/lib/RT/Action/RTIR.pm
+++ b/lib/RT/Action/RTIR.pm
@@ -1,11 +1,11 @@
-
-use warnings;
-use strict;
-use RT::IR;
package RT::Action::RTIR;
+use strict;
+use warnings;
use base 'RT::Action::Generic';
+use RT::IR;
+
sub CreatorCurrentUser {
my $self = shift;
my $user = RT::CurrentUser->new($self->TransactionObj->CurrentUser);
diff --git a/lib/RT/Action/RTIR_ChangeChildOwnership.pm b/lib/RT/Action/RTIR_ChangeChildOwnership.pm
index 7076c0d..b581544 100644
--- a/lib/RT/Action/RTIR_ChangeChildOwnership.pm
+++ b/lib/RT/Action/RTIR_ChangeChildOwnership.pm
@@ -46,6 +46,8 @@
#
package RT::Action::RTIR_ChangeChildOwnership;
use strict;
+use warnings;
+
use base 'RT::Action::RTIR';
=head2 Prepare
diff --git a/lib/RT/Action/RTIR_ChangeParentOwnership.pm b/lib/RT/Action/RTIR_ChangeParentOwnership.pm
index a4fbe8a..7f0df33 100644
--- a/lib/RT/Action/RTIR_ChangeParentOwnership.pm
+++ b/lib/RT/Action/RTIR_ChangeParentOwnership.pm
@@ -46,6 +46,8 @@
#
package RT::Action::RTIR_ChangeParentOwnership;
use strict;
+use warnings;
+
use base 'RT::Action::RTIR';
=head2 Prepare
diff --git a/lib/RT/Action/RTIR_FindIP.pm b/lib/RT/Action/RTIR_FindIP.pm
index 167096d..dea5a3c 100644
--- a/lib/RT/Action/RTIR_FindIP.pm
+++ b/lib/RT/Action/RTIR_FindIP.pm
@@ -1,5 +1,4 @@
package RT::Action::RTIR_FindIP;
-
use strict;
use warnings;
diff --git a/lib/RT/Action/RTIR_MergeIPs.pm b/lib/RT/Action/RTIR_MergeIPs.pm
index 4097af2..7dcb396 100644
--- a/lib/RT/Action/RTIR_MergeIPs.pm
+++ b/lib/RT/Action/RTIR_MergeIPs.pm
@@ -1,5 +1,4 @@
package RT::Action::RTIR_MergeIPs;
-
use strict;
use warnings;
diff --git a/lib/RT/Action/RTIR_OpenParent.pm b/lib/RT/Action/RTIR_OpenParent.pm
index e7e471c..8826fcb 100644
--- a/lib/RT/Action/RTIR_OpenParent.pm
+++ b/lib/RT/Action/RTIR_OpenParent.pm
@@ -45,7 +45,6 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_OpenParent;
-
use strict;
use warnings;
diff --git a/lib/RT/Action/RTIR_ResolveChildren.pm b/lib/RT/Action/RTIR_ResolveChildren.pm
index 1448835..6ab18ff 100644
--- a/lib/RT/Action/RTIR_ResolveChildren.pm
+++ b/lib/RT/Action/RTIR_ResolveChildren.pm
@@ -46,6 +46,8 @@
#
package RT::Action::RTIR_ResolveChildren;
use strict;
+use warnings;
+
use base 'RT::Action::RTIR';
use RT::IR::Ticket;
diff --git a/lib/RT/Action/RTIR_SetBlockState.pm b/lib/RT/Action/RTIR_SetBlockState.pm
index e79c732..c472f30 100644
--- a/lib/RT/Action/RTIR_SetBlockState.pm
+++ b/lib/RT/Action/RTIR_SetBlockState.pm
@@ -45,8 +45,9 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetBlockState;
-
use strict;
+use warnings;
+
use base 'RT::Action::RTIR_SetState';
=head1 GetState
diff --git a/lib/RT/Action/RTIR_SetConstituency.pm b/lib/RT/Action/RTIR_SetConstituency.pm
index 237a94c..b7fab71 100644
--- a/lib/RT/Action/RTIR_SetConstituency.pm
+++ b/lib/RT/Action/RTIR_SetConstituency.pm
@@ -1,5 +1,4 @@
package RT::Action::RTIR_SetConstituency;
-
use strict;
use warnings;
diff --git a/lib/RT/Action/RTIR_SetConstituencyGroup.pm b/lib/RT/Action/RTIR_SetConstituencyGroup.pm
index adc1ab0..3196507 100644
--- a/lib/RT/Action/RTIR_SetConstituencyGroup.pm
+++ b/lib/RT/Action/RTIR_SetConstituencyGroup.pm
@@ -1,5 +1,4 @@
package RT::Action::RTIR_SetConstituencyGroup;
-
use strict;
use warnings;
diff --git a/lib/RT/Action/RTIR_SetDueBySLA.pm b/lib/RT/Action/RTIR_SetDueBySLA.pm
index 1930ec4..6cd6e54 100644
--- a/lib/RT/Action/RTIR_SetDueBySLA.pm
+++ b/lib/RT/Action/RTIR_SetDueBySLA.pm
@@ -45,10 +45,9 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetDueBySLA;
-
use strict;
use warnings;
-use RT::Action::RTIR;
+
use base qw'RT::Action::RTIR';
=head2 Prepare
diff --git a/lib/RT/Action/RTIR_SetDueCorrespond.pm b/lib/RT/Action/RTIR_SetDueCorrespond.pm
index 407e794..7b01ae3 100644
--- a/lib/RT/Action/RTIR_SetDueCorrespond.pm
+++ b/lib/RT/Action/RTIR_SetDueCorrespond.pm
@@ -45,9 +45,8 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetDueCorrespond;
-
-
use strict;
+use warnings;
use base 'RT::Action::RTIR';
diff --git a/lib/RT/Action/RTIR_SetDueIncident.pm b/lib/RT/Action/RTIR_SetDueIncident.pm
index 6c93d71..2638aea 100644
--- a/lib/RT/Action/RTIR_SetDueIncident.pm
+++ b/lib/RT/Action/RTIR_SetDueIncident.pm
@@ -45,9 +45,8 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetDueIncident;
-
-
use strict;
+use warnings;
use base 'RT::Action::RTIR';
diff --git a/lib/RT/Action/RTIR_SetDueReopen.pm b/lib/RT/Action/RTIR_SetDueReopen.pm
index 0355f2e..7724312 100644
--- a/lib/RT/Action/RTIR_SetDueReopen.pm
+++ b/lib/RT/Action/RTIR_SetDueReopen.pm
@@ -45,11 +45,13 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetDueReopen;
-
use strict;
-use RT::IR;
+use warnings;
+
use base 'RT::Action::RTIR';
+use RT::IR;
+
=head2 Prepare
Always run this.
diff --git a/lib/RT/Action/RTIR_SetDueToNow.pm b/lib/RT/Action/RTIR_SetDueToNow.pm
index 3e11676..3190980 100644
--- a/lib/RT/Action/RTIR_SetDueToNow.pm
+++ b/lib/RT/Action/RTIR_SetDueToNow.pm
@@ -45,13 +45,13 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetDueToNow;
-
use strict;
use warnings;
-use RT::IR;
use base 'RT::Action::RTIR';
+use RT::IR;
+
=head1 NAME
RT::Action::RTIR_SetDueToNow - set due date to now
diff --git a/lib/RT/Action/RTIR_SetHowReported.pm b/lib/RT/Action/RTIR_SetHowReported.pm
index 4d33af0..3592e93 100644
--- a/lib/RT/Action/RTIR_SetHowReported.pm
+++ b/lib/RT/Action/RTIR_SetHowReported.pm
@@ -45,8 +45,9 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetHowReported;
-
use strict;
+use warnings;
+
use base 'RT::Action::RTIR';
=head2 Prepare
diff --git a/lib/RT/Action/RTIR_SetIncidentReportState.pm b/lib/RT/Action/RTIR_SetIncidentReportState.pm
index 3d9e36d..1490cd9 100644
--- a/lib/RT/Action/RTIR_SetIncidentReportState.pm
+++ b/lib/RT/Action/RTIR_SetIncidentReportState.pm
@@ -45,7 +45,6 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetIncidentReportState;
-
use strict;
use warnings;
diff --git a/lib/RT/Action/RTIR_SetIncidentResolution.pm b/lib/RT/Action/RTIR_SetIncidentResolution.pm
index ffdaac0..30aa630 100644
--- a/lib/RT/Action/RTIR_SetIncidentResolution.pm
+++ b/lib/RT/Action/RTIR_SetIncidentResolution.pm
@@ -1,6 +1,7 @@
package RT::Action::RTIR_SetIncidentResolution;
-
use strict;
+use warnings;
+
use base 'RT::Action::RTIR';
=head2 Prepare
diff --git a/lib/RT/Action/RTIR_SetIncidentState.pm b/lib/RT/Action/RTIR_SetIncidentState.pm
index 2fba1bd..b826900 100644
--- a/lib/RT/Action/RTIR_SetIncidentState.pm
+++ b/lib/RT/Action/RTIR_SetIncidentState.pm
@@ -45,8 +45,9 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetIncidentState;
-
use strict;
+use warnings;
+
use base 'RT::Action::RTIR_SetState';
=head2 GetState
diff --git a/lib/RT/Action/RTIR_SetInvestigationState.pm b/lib/RT/Action/RTIR_SetInvestigationState.pm
index 51fa101..8f30b25 100644
--- a/lib/RT/Action/RTIR_SetInvestigationState.pm
+++ b/lib/RT/Action/RTIR_SetInvestigationState.pm
@@ -45,7 +45,6 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetInvestigationState;
-
use strict;
use warnings;
diff --git a/lib/RT/Action/RTIR_SetStartedToNow.pm b/lib/RT/Action/RTIR_SetStartedToNow.pm
index 2fb2e3b..95d4cc8 100644
--- a/lib/RT/Action/RTIR_SetStartedToNow.pm
+++ b/lib/RT/Action/RTIR_SetStartedToNow.pm
@@ -1,6 +1,7 @@
package RT::Action::RTIR_SetStartedToNow;
-
use strict;
+use warnings;
+
use base 'RT::Action::RTIR';
sub Prepare { return 1 }
diff --git a/lib/RT/Action/RTIR_SetStartsByBizHours.pm b/lib/RT/Action/RTIR_SetStartsByBizHours.pm
index 0c5190a..17027f9 100644
--- a/lib/RT/Action/RTIR_SetStartsByBizHours.pm
+++ b/lib/RT/Action/RTIR_SetStartsByBizHours.pm
@@ -45,8 +45,9 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetStartsByBizHours;
-
use strict;
+use warnings;
+
use base 'RT::Action::RTIR';
=head2 Prepare
diff --git a/lib/RT/Action/RTIR_SetStartsToNow.pm b/lib/RT/Action/RTIR_SetStartsToNow.pm
index 2e299e0..0302597 100644
--- a/lib/RT/Action/RTIR_SetStartsToNow.pm
+++ b/lib/RT/Action/RTIR_SetStartsToNow.pm
@@ -45,8 +45,9 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetStartsToNow;
-
use strict;
+use warnings;
+
use base 'RT::Action::RTIR';
=head2 Prepare
diff --git a/lib/RT/Action/RTIR_SetState.pm b/lib/RT/Action/RTIR_SetState.pm
index 48349b4..90be07e 100644
--- a/lib/RT/Action/RTIR_SetState.pm
+++ b/lib/RT/Action/RTIR_SetState.pm
@@ -1,5 +1,4 @@
package RT::Action::RTIR_SetState;
-
use strict;
use warnings;
diff --git a/lib/RT/Action/RTIR_UnsetDue.pm b/lib/RT/Action/RTIR_UnsetDue.pm
index 967f082..bd282a2 100644
--- a/lib/RT/Action/RTIR_UnsetDue.pm
+++ b/lib/RT/Action/RTIR_UnsetDue.pm
@@ -45,8 +45,9 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_UnsetDue;
-
use strict;
+use warnings;
+
use base 'RT::Action::RTIR';
=head2 Prepare
diff --git a/lib/RT/Condition/RTIR.pm b/lib/RT/Condition/RTIR.pm
index 21363d4..8159041 100644
--- a/lib/RT/Condition/RTIR.pm
+++ b/lib/RT/Condition/RTIR.pm
@@ -1,11 +1,11 @@
-
+package RT::Condition::RTIR;
use warnings;
use strict;
-use RT::IR;
-package RT::Condition::RTIR;
use base 'RT::Condition::Generic';
+use RT::IR;
+
=head1 NAME
RT::Condition::RTIR - generic checks
diff --git a/lib/RT/Condition/RTIR_BlockActivation.pm b/lib/RT/Condition/RTIR_BlockActivation.pm
index d004ba7..df235c4 100644
--- a/lib/RT/Condition/RTIR_BlockActivation.pm
+++ b/lib/RT/Condition/RTIR_BlockActivation.pm
@@ -1,9 +1,9 @@
package RT::Condition::RTIR_BlockActivation;
-
use strict;
use warnings;
use base 'RT::Condition::RTIR';
+
use RT::CustomField;
=head2 IsApplicable
diff --git a/lib/RT/Condition/RTIR_CloseTicket.pm b/lib/RT/Condition/RTIR_CloseTicket.pm
index 6944b08..ca6e165 100644
--- a/lib/RT/Condition/RTIR_CloseTicket.pm
+++ b/lib/RT/Condition/RTIR_CloseTicket.pm
@@ -47,9 +47,8 @@
package RT::Condition::RTIR_CloseTicket;
-
-
use strict;
+use warnings;
use base 'RT::Condition::RTIR';
diff --git a/lib/RT/Condition/RTIR_CustomerResponse.pm b/lib/RT/Condition/RTIR_CustomerResponse.pm
index 4e54274..00c7120 100644
--- a/lib/RT/Condition/RTIR_CustomerResponse.pm
+++ b/lib/RT/Condition/RTIR_CustomerResponse.pm
@@ -45,7 +45,6 @@
# }}} END BPS TAGGED BLOCK
package RT::Condition::RTIR_CustomerResponse;
-
use strict;
use warnings;
diff --git a/lib/RT/Condition/RTIR_LinkingToIncident.pm b/lib/RT/Condition/RTIR_LinkingToIncident.pm
index 066ef68..27d2042 100644
--- a/lib/RT/Condition/RTIR_LinkingToIncident.pm
+++ b/lib/RT/Condition/RTIR_LinkingToIncident.pm
@@ -1,5 +1,4 @@
package RT::Condition::RTIR_LinkingToIncident;
-
use strict;
use warnings;
diff --git a/lib/RT/Condition/RTIR_Merge.pm b/lib/RT/Condition/RTIR_Merge.pm
index ae5749a..83505db 100644
--- a/lib/RT/Condition/RTIR_Merge.pm
+++ b/lib/RT/Condition/RTIR_Merge.pm
@@ -1,5 +1,4 @@
package RT::Condition::RTIR_Merge;
-
use strict;
use warnings;
diff --git a/lib/RT/Condition/RTIR_ReopenTicket.pm b/lib/RT/Condition/RTIR_ReopenTicket.pm
index 46061e3..c3a8664 100644
--- a/lib/RT/Condition/RTIR_ReopenTicket.pm
+++ b/lib/RT/Condition/RTIR_ReopenTicket.pm
@@ -47,9 +47,8 @@
package RT::Condition::RTIR_ReopenTicket;
-
-
use strict;
+use warnings;
use base 'RT::Condition::RTIR';
diff --git a/lib/RT/Condition/RTIR_RequireConstituencyChange.pm b/lib/RT/Condition/RTIR_RequireConstituencyChange.pm
index 4707598..a4cf617 100644
--- a/lib/RT/Condition/RTIR_RequireConstituencyChange.pm
+++ b/lib/RT/Condition/RTIR_RequireConstituencyChange.pm
@@ -1,5 +1,4 @@
package RT::Condition::RTIR_RequireConstituencyChange;
-
use strict;
use warnings;
diff --git a/lib/RT/Condition/RTIR_RequireConstituencyGroupChange.pm b/lib/RT/Condition/RTIR_RequireConstituencyGroupChange.pm
index 762093b..f7bf79b 100644
--- a/lib/RT/Condition/RTIR_RequireConstituencyGroupChange.pm
+++ b/lib/RT/Condition/RTIR_RequireConstituencyGroupChange.pm
@@ -1,9 +1,9 @@
package RT::Condition::RTIR_RequireConstituencyGroupChange;
-
use strict;
use warnings;
use base 'RT::Condition::RTIR';
+
use RT::CustomField;
=head2 IsApplicable
diff --git a/lib/RT/Condition/RTIR_RequireDueChange.pm b/lib/RT/Condition/RTIR_RequireDueChange.pm
index 6a0a8e1..7efc5e2 100644
--- a/lib/RT/Condition/RTIR_RequireDueChange.pm
+++ b/lib/RT/Condition/RTIR_RequireDueChange.pm
@@ -47,9 +47,9 @@
package RT::Condition::RTIR_RequireDueChange;
-
-
use strict;
+use warnings;
+
use base 'RT::Condition::RTIR';
diff --git a/lib/RT/Condition/RTIR_RequireStateChange.pm b/lib/RT/Condition/RTIR_RequireStateChange.pm
index 31bc58a..78d29fe 100644
--- a/lib/RT/Condition/RTIR_RequireStateChange.pm
+++ b/lib/RT/Condition/RTIR_RequireStateChange.pm
@@ -47,8 +47,6 @@
package RT::Condition::RTIR_RequireStateChange;
-
-
use strict;
use warnings;
diff --git a/lib/RT/Condition/RTIR_StaffResponse.pm b/lib/RT/Condition/RTIR_StaffResponse.pm
index 7023526..355602a 100644
--- a/lib/RT/Condition/RTIR_StaffResponse.pm
+++ b/lib/RT/Condition/RTIR_StaffResponse.pm
@@ -47,9 +47,8 @@
package RT::Condition::RTIR_StaffResponse;
-
-
use strict;
+use warnings;
use base 'RT::Condition::RTIR';
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 3556c88..d80d5ff 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -45,7 +45,6 @@
# }}} END BPS TAGGED BLOCK
#
package RT::IR;
-
use 5.008003;
use warnings;
use strict;
diff --git a/lib/RT/IR/Test.pm b/lib/RT/IR/Test.pm
index 01a5d71..12418b9 100644
--- a/lib/RT/IR/Test.pm
+++ b/lib/RT/IR/Test.pm
@@ -1,11 +1,10 @@
+package RT::IR::Test;
use strict;
use warnings;
### after: use lib qw(@RT_LIB_PATH@);
use lib qw(/opt/rt3/local/lib /opt/rt3/lib);
-package RT::IR::Test;
-
BEGIN {
local $@;
eval { require RT::Test; 1 } or do {
diff --git a/lib/RT/IR/Test/Web.pm b/lib/RT/IR/Test/Web.pm
index 62eaf7f..36ce86c 100644
--- a/lib/RT/IR/Test/Web.pm
+++ b/lib/RT/IR/Test/Web.pm
@@ -1,5 +1,4 @@
package RT::IR::Test::Web;
-
use strict;
use warnings;
diff --git a/lib/RT/IR/Ticket.pm b/lib/RT/IR/Ticket.pm
index 626d460..92c287f 100644
--- a/lib/RT/IR/Ticket.pm
+++ b/lib/RT/IR/Ticket.pm
@@ -1,5 +1,4 @@
package RT::IR::Ticket;
-
use strict;
use warnings;
commit 6bcf6c3fc8a0bd211932b0cd9d2c8fbf54f35c18
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 29 18:33:50 2011 -0400
Add warnings to RTIR_Config
diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index c9a212d..0134ba4 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -1,3 +1,5 @@
+use warnings;
+
# WebNoAuthRegex - What portion of RT's URLspace should not require
# authentication. Adjust it according to RTIR paths
commit c58d56e44fa4c8abe0703a037cc9a3a5821b7216
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 29 18:35:06 2011 -0400
Put and explicit return value on the debug function
diff --git a/etc/add_constituency b/etc/add_constituency
index 94797de..ed4f49f 100644
--- a/etc/add_constituency
+++ b/etc/add_constituency
@@ -64,6 +64,7 @@ sub debug {
return if $opt{'quiet'};
print @_;
print "\n" if $_[-1] && $_[-1] !~ /\n$/s;
+ return 1;
};
use Getopt::Long;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list