[Rt-commit] rt branch, 3.8/perlcritic-explicit-returns, created. rt-3.8.10-157-g94479bf
Thomas Sibley
trs at bestpractical.com
Thu Jul 21 18:44:28 EDT 2011
The branch, 3.8/perlcritic-explicit-returns has been created
at 94479bf647f518b1351252336f391bd748ef9817 (commit)
- Log -----------------------------------------------------------------
commit 58b4fa414839f457e724a3fcc7b4f11673ef4d82
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Jul 5 14:41:02 2011 -0400
Explicit returns for Create, _Init, and _CoreAccessible
Some originally generated by DBIx::SearchBuilder (but hand-maintained for a
while now), some overriding in subclasses.
diff --git a/lib/RT/ACE.pm b/lib/RT/ACE.pm
index dca50c3..429e5ab 100755
--- a/lib/RT/ACE.pm
+++ b/lib/RT/ACE.pm
@@ -75,7 +75,7 @@ sub _Init {
my $self = shift;
$self->Table('ACL');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -111,7 +111,7 @@ sub Create {
DelegatedFrom => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
PrincipalType => $args{'PrincipalType'},
PrincipalId => $args{'PrincipalId'},
RightName => $args{'RightName'},
@@ -262,7 +262,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Action.pm b/lib/RT/Action.pm
index cd1f4c8..95f512a 100755
--- a/lib/RT/Action.pm
+++ b/lib/RT/Action.pm
@@ -107,7 +107,7 @@ sub _Init {
Scalar::Util::weaken($self->{'TemplateObj'});
Scalar::Util::weaken($self->{'TicketObj'});
Scalar::Util::weaken($self->{'TransactionObj'});
-
+ return;
}
# }}}
diff --git a/lib/RT/Attachment.pm b/lib/RT/Attachment.pm
index 5b9d9c0..2320e7c 100755
--- a/lib/RT/Attachment.pm
+++ b/lib/RT/Attachment.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('Attachments');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -118,7 +118,7 @@ sub Create {
Headers => '',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
TransactionId => $args{'TransactionId'},
Parent => $args{'Parent'},
MessageId => $args{'MessageId'},
@@ -325,7 +325,7 @@ Returns the current value of Created.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Attachment_Overlay.pm b/lib/RT/Attachment_Overlay.pm
index 5bc4286..63dba30 100644
--- a/lib/RT/Attachment_Overlay.pm
+++ b/lib/RT/Attachment_Overlay.pm
@@ -73,7 +73,7 @@ use MIME::Base64;
use MIME::QuotedPrint;
sub _OverlayAccessible {
- {
+ return {
TransactionId => { 'read'=>1, 'public'=>1, 'write' => 0 },
MessageId => { 'read'=>1, 'write' => 0 },
Parent => { 'read'=>1, 'write' => 0 },
diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
index e24f024..58f89d5 100644
--- a/lib/RT/Attribute.pm
+++ b/lib/RT/Attribute.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('Attributes');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -112,7 +112,7 @@ sub Create {
ObjectId => '',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Description => $args{'Description'},
Content => $args{'Content'},
@@ -280,7 +280,7 @@ Returns the current value of LastUpdated.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Attribute_Overlay.pm b/lib/RT/Attribute_Overlay.pm
index 279ee25..00c04b7 100644
--- a/lib/RT/Attribute_Overlay.pm
+++ b/lib/RT/Attribute_Overlay.pm
@@ -177,7 +177,7 @@ sub Create {
}
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Content => $args{'Content'},
ContentType => $args{'ContentType'},
diff --git a/lib/RT/CachedGroupMember.pm b/lib/RT/CachedGroupMember.pm
index 018fbf4..d827560 100755
--- a/lib/RT/CachedGroupMember.pm
+++ b/lib/RT/CachedGroupMember.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('CachedGroupMembers');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -110,7 +110,7 @@ sub Create {
Disabled => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
GroupId => $args{'GroupId'},
MemberId => $args{'MemberId'},
Via => $args{'Via'},
@@ -223,7 +223,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Condition.pm b/lib/RT/Condition.pm
index 458bf80..038adf5 100755
--- a/lib/RT/Condition.pm
+++ b/lib/RT/Condition.pm
@@ -111,6 +111,7 @@ sub _Init {
$self->{'TransactionObj'} = $args{'TransactionObj'};
$self->{'ApplicableTransTypes'} = $args{'ApplicableTransTypes'};
$self->CurrentUser($args{'CurrentUser'});
+ return;
}
# }}}
diff --git a/lib/RT/CurrentUser.pm b/lib/RT/CurrentUser.pm
index ac771a2..da782af 100755
--- a/lib/RT/CurrentUser.pm
+++ b/lib/RT/CurrentUser.pm
@@ -120,7 +120,7 @@ sub _Init {
}
$self->_BuildTableAttributes;
-
+ return;
}
=head2 Create, Delete and Set*
@@ -168,7 +168,7 @@ sub UserObj {
}
sub _CoreAccessible {
- {
+ return {
Name => { 'read' => 1 },
Gecos => { 'read' => 1 },
RealName => { 'read' => 1 },
diff --git a/lib/RT/CustomField.pm b/lib/RT/CustomField.pm
index cdec07c..267e051 100755
--- a/lib/RT/CustomField.pm
+++ b/lib/RT/CustomField.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('CustomFields');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -123,7 +123,7 @@ sub Create {
IncludeContentForValue => '',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Type => $args{'Type'},
MaxValues => $args{'MaxValues'},
@@ -350,7 +350,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/CustomFieldValue.pm b/lib/RT/CustomFieldValue.pm
index d6c8be7..980d9b6 100755
--- a/lib/RT/CustomFieldValue.pm
+++ b/lib/RT/CustomFieldValue.pm
@@ -79,7 +79,7 @@ sub _Init {
my $self = shift;
$self->Table('CustomFieldValues');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -109,7 +109,7 @@ sub Create {
SortOrder => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
CustomField => $args{'CustomField'},
Name => $args{'Name'},
Description => $args{'Description'},
@@ -253,7 +253,7 @@ Returns the current value of LastUpdated.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Group.pm b/lib/RT/Group.pm
index b7624aa..8f2f942 100755
--- a/lib/RT/Group.pm
+++ b/lib/RT/Group.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('Groups');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -110,7 +110,7 @@ sub Create {
Instance => '',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Description => $args{'Description'},
Domain => $args{'Domain'},
@@ -223,7 +223,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/GroupMember.pm b/lib/RT/GroupMember.pm
index cf7a7bf..8730a05 100755
--- a/lib/RT/GroupMember.pm
+++ b/lib/RT/GroupMember.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('GroupMembers');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -104,7 +104,7 @@ sub Create {
MemberId => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
GroupId => $args{'GroupId'},
MemberId => $args{'MemberId'},
);
@@ -160,7 +160,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Link.pm b/lib/RT/Link.pm
index cadb9af..443d5d6 100755
--- a/lib/RT/Link.pm
+++ b/lib/RT/Link.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('Links');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -110,7 +110,7 @@ sub Create {
LocalBase => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Base => $args{'Base'},
Target => $args{'Target'},
Type => $args{'Type'},
@@ -259,7 +259,7 @@ Returns the current value of Created.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/ObjectCustomField.pm b/lib/RT/ObjectCustomField.pm
index 2996daa..5b86cfb 100644
--- a/lib/RT/ObjectCustomField.pm
+++ b/lib/RT/ObjectCustomField.pm
@@ -79,7 +79,7 @@ sub _Init {
my $self = shift;
$self->Table('ObjectCustomFields');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -107,7 +107,7 @@ sub Create {
SortOrder => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
CustomField => $args{'CustomField'},
ObjectId => $args{'ObjectId'},
SortOrder => $args{'SortOrder'},
@@ -232,7 +232,7 @@ Returns the current value of LastUpdated.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/ObjectCustomFieldValue.pm b/lib/RT/ObjectCustomFieldValue.pm
index 552594e..11f695e 100644
--- a/lib/RT/ObjectCustomFieldValue.pm
+++ b/lib/RT/ObjectCustomFieldValue.pm
@@ -79,7 +79,7 @@ sub _Init {
my $self = shift;
$self->Table('ObjectCustomFieldValues');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -119,7 +119,7 @@ sub Create {
Disabled => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
CustomField => $args{'CustomField'},
ObjectType => $args{'ObjectType'},
ObjectId => $args{'ObjectId'},
@@ -344,7 +344,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Principal.pm b/lib/RT/Principal.pm
index b6b195a..829d2f6 100755
--- a/lib/RT/Principal.pm
+++ b/lib/RT/Principal.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('Principals');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -106,7 +106,7 @@ sub Create {
Disabled => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
PrincipalType => $args{'PrincipalType'},
ObjectId => $args{'ObjectId'},
Disabled => $args{'Disabled'},
@@ -181,7 +181,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Queue.pm b/lib/RT/Queue.pm
index b6530f5..9f182b4 100755
--- a/lib/RT/Queue.pm
+++ b/lib/RT/Queue.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('Queues');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -116,7 +116,7 @@ sub Create {
Disabled => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Description => $args{'Description'},
CorrespondAddress => $args{'CorrespondAddress'},
@@ -322,7 +322,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 86b8bf0..6866b83 100755
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -92,6 +92,7 @@ sub _Init {
my $self = shift;
$self->_BuildTableAttributes unless ($_TABLE_ATTR->{ref($self)});
$self->CurrentUser(@_);
+ return;
}
# }}}
diff --git a/lib/RT/Scrip.pm b/lib/RT/Scrip.pm
index 54e103b..a8f278e 100755
--- a/lib/RT/Scrip.pm
+++ b/lib/RT/Scrip.pm
@@ -82,7 +82,7 @@ sub _Init {
my $self = shift;
$self->Table('Scrips');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -126,7 +126,7 @@ sub Create {
Template => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Description => $args{'Description'},
ScripCondition => $args{'ScripCondition'},
ScripAction => $args{'ScripAction'},
@@ -445,7 +445,7 @@ Returns the current value of LastUpdated.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/ScripAction.pm b/lib/RT/ScripAction.pm
index 14eb2d9..48400c5 100755
--- a/lib/RT/ScripAction.pm
+++ b/lib/RT/ScripAction.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('ScripActions');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -108,7 +108,7 @@ sub Create {
Argument => '',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Description => $args{'Description'},
ExecModule => $args{'ExecModule'},
@@ -238,7 +238,7 @@ Returns the current value of LastUpdated.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/ScripCondition.pm b/lib/RT/ScripCondition.pm
index 1aa2727..04e2fe7 100755
--- a/lib/RT/ScripCondition.pm
+++ b/lib/RT/ScripCondition.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('ScripConditions');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -110,7 +110,7 @@ sub Create {
ApplicableTransTypes => '',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Description => $args{'Description'},
ExecModule => $args{'ExecModule'},
@@ -259,7 +259,7 @@ Returns the current value of LastUpdated.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Search.pm b/lib/RT/Search.pm
index 2335540..e74ffb1 100755
--- a/lib/RT/Search.pm
+++ b/lib/RT/Search.pm
@@ -97,6 +97,7 @@ sub _Init {
$self->{'TicketsObj'} = $args{'TicketsObj'};
$self->{'Argument'} = $args{'Argument'};
+ return;
}
# }}}
diff --git a/lib/RT/Search/Googleish.pm b/lib/RT/Search/Googleish.pm
index e76393d..a3b4b71 100644
--- a/lib/RT/Search/Googleish.pm
+++ b/lib/RT/Search/Googleish.pm
@@ -79,7 +79,7 @@ sub _Init {
my %args = @_;
$self->{'Queues'} = delete($args{'Queues'}) || [];
- $self->SUPER::_Init(%args);
+ return $self->SUPER::_Init(%args);
}
# }}}
diff --git a/lib/RT/SearchBuilder.pm b/lib/RT/SearchBuilder.pm
index e4a17f4..4bc9b9b 100755
--- a/lib/RT/SearchBuilder.pm
+++ b/lib/RT/SearchBuilder.pm
@@ -82,7 +82,7 @@ sub _Init {
$RT::Logger->err("$self was created without a CurrentUser");
return(0);
}
- $self->SUPER::_Init( 'Handle' => $RT::Handle);
+ return $self->SUPER::_Init( 'Handle' => $RT::Handle);
}
sub OrderByCols {
diff --git a/lib/RT/Shredder.pm b/lib/RT/Shredder.pm
index c94c70e..c3185e1 100644
--- a/lib/RT/Shredder.pm
+++ b/lib/RT/Shredder.pm
@@ -299,6 +299,7 @@ sub _Init
$self->{'cache'} = {};
$self->{'resolver'} = {};
$self->{'dump_plugins'} = [];
+ return;
}
=head4 CastObjectsToRecords( Objects => undef )
diff --git a/lib/RT/Shredder/Plugin.pm b/lib/RT/Shredder/Plugin.pm
index ba9c64f..c9a7978 100644
--- a/lib/RT/Shredder/Plugin.pm
+++ b/lib/RT/Shredder/Plugin.pm
@@ -103,6 +103,7 @@ sub _Init
my $self = shift;
my %args = ( @_ );
$self->{'opt'} = \%args;
+ return;
}
=head2 List
diff --git a/lib/RT/Shredder/Plugin/Base.pm b/lib/RT/Shredder/Plugin/Base.pm
index 14a657a..a186365 100644
--- a/lib/RT/Shredder/Plugin/Base.pm
+++ b/lib/RT/Shredder/Plugin/Base.pm
@@ -69,6 +69,7 @@ sub _Init
{
my $self = shift;
$self->{'opt'} = { @_ };
+ return;
}
=head1 USAGE
diff --git a/lib/RT/System.pm b/lib/RT/System.pm
index 4d21d8a..c7041b9 100755
--- a/lib/RT/System.pm
+++ b/lib/RT/System.pm
@@ -149,7 +149,14 @@ sub AddRights {
sub _Init {
my $self = shift;
- $self->SUPER::_Init (@_) if @_ && $_[0];
+
+ # XXX: This should potentially just always call SUPER::_Init and return it
+ # instead of doing so conditionally.
+ if (@_ && $_[0]) {
+ return $self->SUPER::_Init(@_);
+ } else {
+ return;
+ }
}
=head2 id
diff --git a/lib/RT/Template.pm b/lib/RT/Template.pm
index bc53282..2b45898 100755
--- a/lib/RT/Template.pm
+++ b/lib/RT/Template.pm
@@ -79,7 +79,7 @@ sub _Init {
my $self = shift;
$self->Table('Templates');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -115,7 +115,7 @@ sub Create {
Content => '',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Queue => $args{'Queue'},
Name => $args{'Name'},
Description => $args{'Description'},
@@ -316,7 +316,7 @@ Returns the current value of Created.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index f43cea1..75a6160 100755
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -79,7 +79,7 @@ sub _Init {
my $self = shift;
$self->Table('Tickets');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -141,7 +141,7 @@ sub Create {
Disabled => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
EffectiveId => $args{'EffectiveId'},
Queue => $args{'Queue'},
Type => $args{'Type'},
@@ -591,7 +591,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/Tickets_Overlay.pm b/lib/RT/Tickets_Overlay.pm
index 97b60e7..ea65901 100755
--- a/lib/RT/Tickets_Overlay.pm
+++ b/lib/RT/Tickets_Overlay.pm
@@ -2772,7 +2772,7 @@ sub _Init {
$self->SUPER::_Init(@_);
$self->_InitSQL;
-
+ return;
}
# }}}
diff --git a/lib/RT/Transaction.pm b/lib/RT/Transaction.pm
index c64408b..76156dc 100755
--- a/lib/RT/Transaction.pm
+++ b/lib/RT/Transaction.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('Transactions');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -122,7 +122,7 @@ sub Create {
Data => '',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
ObjectType => $args{'ObjectType'},
ObjectId => $args{'ObjectId'},
TimeTaken => $args{'TimeTaken'},
@@ -367,7 +367,7 @@ Returns the current value of Created.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
index 3f0321c..19ae701 100755
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('Users');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -158,7 +158,7 @@ sub Create {
PGPKey => '',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Password => $args{'Password'},
Comments => $args{'Comments'},
@@ -763,7 +763,7 @@ Returns the current value of LastUpdated.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
commit d11deb6c3e94110566541bc014233d8eef10f331
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:22 2011 -0400
Explicit returns for bin/rt-crontool.in
diff --git a/bin/rt-crontool.in b/bin/rt-crontool.in
index 23c467b..0f08945 100755
--- a/bin/rt-crontool.in
+++ b/bin/rt-crontool.in
@@ -228,6 +228,7 @@ sub process {
#commit our action.
return unless $action_obj->Commit;
print loc("Action committed.\n") if $verbose;
+ return;
}
=head2 get_transactions
@@ -320,7 +321,7 @@ Localize this string, with the current user's currentuser object
=cut
sub loc {
- $CurrentUser->loc(@_);
+ return $CurrentUser->loc(@_);
}
# }}}
commit ce06803a655eae181473e8ce23012430f1ad94e0
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:22 2011 -0400
Explicit returns for bin/rt.in
diff --git a/bin/rt.in b/bin/rt.in
index a85c27a..98beea0 100755
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -107,7 +107,10 @@ $no_strong_auth = 'switched off by externalauth=0'
my $prompt = 'rt> ';
sub whine;
-sub DEBUG { warn @_ if $config{debug} >= shift }
+sub DEBUG {
+ warn @_ if $config{debug} >= shift;
+ return;
+}
# These regexes are used by command handlers to parse arguments.
# (XXX: Ask Autrijus how i18n changes these definitions.)
@@ -184,6 +187,7 @@ sub shell {
@ARGV = shellwords($_);
handler();
}
+ return 0;
}
sub version {
@@ -1156,7 +1160,7 @@ sub submit {
# Deletes the current session cookie.
sub delete {
my ($self) = @_;
- delete $self->{sids}{$s}{$u};
+ return delete $self->{sids}{$s}{$u};
}
# Adds a Cookie header to an outgoing HTTP request.
@@ -1165,6 +1169,7 @@ sub submit {
my $cookie = $self->cookie();
$request->header(Cookie => $cookie) if defined $cookie;
+ return $cookie;
}
# Extracts the Set-Cookie header from an HTTP response, and updates
@@ -1176,6 +1181,7 @@ sub submit {
if (defined $cookie && $cookie =~ /^RT_SID_(.[^;,\s]+=[0-9A-Fa-f]+);/) {
$self->{sids}{$s}{$u} = $1;
}
+ return $self->{sids}{$s}{$u};
}
# Loads the session cache from the specified file.
@@ -1522,6 +1528,7 @@ sub vpush {
else {
$hash->{$key} = $val;
}
+ return;
}
# "Normalise" a hash key that's known to be multi-valued.
@@ -1626,7 +1633,7 @@ sub get_var_argument {
if (@ARGV) {
my $kv = shift @ARGV;
if (my ($k, $v) = $kv =~ /^($field)=(.*)$/) {
- push @{ $data->{$k} }, $v;
+ return push @{ $data->{$k} }, $v;
}
else {
@_ = ("Invalid variable specification: '$kv'.");
@@ -1637,6 +1644,7 @@ sub get_var_argument {
@_ = ("No variable argument specified with -S.");
goto &whine;
}
+ return;
}
sub is_object_spec {
@@ -1731,6 +1739,7 @@ sub prettyshow {
print "$k->{Attachments}\n" if exists $k->{Attachments} and
$k->{Attachments};
}
+ return;
}
sub prettylist {
@@ -1768,6 +1777,7 @@ sub prettylist {
print @me if @me;
printf "========== %2d unowned tickets ==========\n", scalar @open if @open;
print @open if @open;
+ return;
}
exit handler();
commit cd5042967c26ee5606d576dc7f4eedcf448c1a08
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:22 2011 -0400
Explicit returns for bin/standalone_httpd.in
diff --git a/bin/standalone_httpd.in b/bin/standalone_httpd.in
index a0cd7d4..24bc634 100755
--- a/bin/standalone_httpd.in
+++ b/bin/standalone_httpd.in
@@ -145,6 +145,7 @@ sub run_server {
if ( my $err = $@ ) {
handle_startup_error($err);
}
+ return;
}
sub handle_startup_error {
@@ -156,6 +157,7 @@ sub handle_startup_error {
"Something went wrong while trying to run RT's standalone web server:\n\t"
. $err;
}
+ return;
}
@@ -182,4 +184,5 @@ EOF
}
run_server( 8000 + int( rand(1024) ) );
}
+ return;
}
commit 3cae6656ce9e4aadfe42221ff5fe19ecb4480668
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:22 2011 -0400
Explicit returns for lib/RT.pm.in
diff --git a/lib/RT.pm.in b/lib/RT.pm.in
index 7c7cd43..c5e6575 100755
--- a/lib/RT.pm.in
+++ b/lib/RT.pm.in
@@ -169,7 +169,7 @@ sub LoadConfig {
$gpgopts->{homedir} = File::Spec->catfile( $BasePath, $gpgopts->{homedir} );
}
- RT::I18N->Init;
+ return RT::I18N->Init;
}
=head2 Init
@@ -192,7 +192,7 @@ sub Init {
InitLogging();
InitPlugins();
RT->Config->PostLoadCheck;
-
+ return;
}
=head2 ConnectToDatabase
@@ -334,6 +334,7 @@ sub InitLogging {
}
}
InitSignalHandlers();
+ return;
}
sub InitSignalHandlers {
@@ -366,6 +367,7 @@ sub InitSignalHandlers {
}
die $_[0];
};
+ return;
}
@@ -483,6 +485,7 @@ sub InitClasses {
RT::I18N->LoadLexicons;
}
+ return;
}
=head2 InitSystemObjects
@@ -505,6 +508,7 @@ sub InitSystemObjects {
require RT::System;
$System = RT::System->new( $SystemUser );
+ return;
}
=head1 CLASS METHODS
@@ -637,6 +641,7 @@ sub InitPluginPaths {
my %seen;
@INC = grep !$seen{$_}++, @tmp_inc;
+ return;
}
=head2 InitPlugins
commit 383e514038c63d9086386ef9903f0b4a010ab368
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/ACE_Overlay.pm
diff --git a/lib/RT/ACE_Overlay.pm b/lib/RT/ACE_Overlay.pm
index 5bf9fdd..655621f 100755
--- a/lib/RT/ACE_Overlay.pm
+++ b/lib/RT/ACE_Overlay.pm
@@ -444,7 +444,7 @@ sub Delete {
) {
return ( 0, $self->loc('Permission Denied') );
}
- $self->_Delete(@_);
+ return $self->_Delete(@_);
}
# Helper for Delete with no ACL check
commit 1742bc2c0da4dc0aefae57b52a969176c4907946
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/ACL_Overlay.pm
diff --git a/lib/RT/ACL_Overlay.pm b/lib/RT/ACL_Overlay.pm
index 291b707..e4ccbb5 100755
--- a/lib/RT/ACL_Overlay.pm
+++ b/lib/RT/ACL_Overlay.pm
@@ -100,14 +100,14 @@ sub LimitToObject {
VALUE => ref($obj),
ENTRYAGGREGATOR => 'OR'
);
- $self->Limit(
+ # XXX 4.2: return;
+ return $self->Limit(
FIELD => 'ObjectId',
OPERATOR => '=',
VALUE => $obj->id,
ENTRYAGGREGATOR => 'OR',
QUOTEVALUE => 0
);
-
}
# }}}
@@ -136,7 +136,8 @@ sub LimitNotObject {
ENTRYAGGREGATOR => 'OR',
SUBCLAUSE => $obj->id
);
- $self->Limit( FIELD => 'ObjectId',
+ # XXX 4.2: return;
+ return $self->Limit( FIELD => 'ObjectId',
OPERATOR => '!=',
VALUE => $obj->id,
ENTRYAGGREGATOR => 'OR',
@@ -202,6 +203,7 @@ sub LimitToPrincipal {
VALUE => $args{'Id'},
ENTRYAGGREGATOR => 'OR' );
}
+ return 1;
}
# }}}
@@ -219,7 +221,8 @@ Don't list rights which have been delegated.
sub ExcludeDelegatedRights {
my $self = shift;
$self->DelegatedBy(Id => 0);
- $self->DelegatedFrom(Id => 0);
+ # XXX 4.2: return;
+ return $self->DelegatedFrom(Id => 0);
}
# }}}
@@ -240,13 +243,12 @@ sub DelegatedBy {
Id => undef,
@_
);
- $self->Limit(
+ return $self->Limit(
FIELD => 'DelegatedBy',
OPERATOR => '=',
VALUE => $args{'Id'},
ENTRYAGGREGATOR => 'OR'
);
-
}
# }}}
@@ -267,8 +269,7 @@ sub DelegatedFrom {
my %args = (
Id => undef,
@_);
- $self->Limit(FIELD => 'DelegatedFrom', OPERATOR=> '=', VALUE => $args{'Id'}, ENTRYAGGREGATOR => 'OR');
-
+ return $self->Limit(FIELD => 'DelegatedFrom', OPERATOR=> '=', VALUE => $args{'Id'}, ENTRYAGGREGATOR => 'OR');
}
# }}}
@@ -336,6 +337,7 @@ sub _BuildHash {
$self->{'as_hash'}->{"$hashkey"} =1;
}
+ return;
}
commit d66ea69c4788189d9fbf2af846185f294786a897
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Action/Autoreply.pm
diff --git a/lib/RT/Action/Autoreply.pm b/lib/RT/Action/Autoreply.pm
index e3e792e..64d08d9 100755
--- a/lib/RT/Action/Autoreply.pm
+++ b/lib/RT/Action/Autoreply.pm
@@ -63,7 +63,7 @@ Set up the relevant recipients, then call our parent.
sub Prepare {
my $self = shift;
$self->SetRecipients();
- $self->SUPER::Prepare();
+ return $self->SUPER::Prepare();
}
# {{{ sub SetRecipients
@@ -104,7 +104,7 @@ sub SetReturnAddress {
$self->TicketObj->QueueObj->Name;
}
- $self->SUPER::SetReturnAddress( @_, friendly_name => $friendly_name );
+ return $self->SUPER::SetReturnAddress( @_, friendly_name => $friendly_name );
}
@@ -123,6 +123,7 @@ sub SetRTSpecialHeaders {
my $self = shift;
$self->SUPER::SetRTSpecialHeaders(@_);
$self->SetHeader( 'Auto-Submitted', 'auto-replied' );
+ return;
}
# }}}
commit 50606310b0f2af49b030811032821b36cdf029cd
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Action/CreateTickets.pm
diff --git a/lib/RT/Action/CreateTickets.pm b/lib/RT/Action/CreateTickets.pm
index 7b8a136..5fd9028 100755
--- a/lib/RT/Action/CreateTickets.pm
+++ b/lib/RT/Action/CreateTickets.pm
@@ -562,6 +562,7 @@ sub Parse {
$self->_ParseXSVTemplate(%args);
}
+ return;
}
=head2 _ParseMultilineTemplate
@@ -637,6 +638,7 @@ sub _ParseMultilineTemplate {
if ( $template_id && !$queue && $args{'Queue'} ) {
$self->{'templates'}->{$template_id} .= "Queue: $args{'Queue'}\n";
}
+ return;
}
sub ParseLines {
@@ -927,6 +929,7 @@ sub _ParseXSVTemplate {
$self->{'templates'}->{$template_id} = $template;
}
+ return;
}
sub GetDeferred {
@@ -954,6 +957,7 @@ sub GetDeferred {
# Status is postponed so we don't violate dependencies
$id, { Status => $args->{'status'}, }
);
+ return;
}
sub GetUpdateTemplate {
@@ -1236,7 +1240,7 @@ sub PostProcess {
my %args = %{ shift(@$postponed) };
$ticket->SetStatus( $args{Status} ) if defined $args{Status};
}
-
+ return;
}
RT::Base->_ImportOverlays();
commit 8106c5ad7d27c3c7702529e1bf4977aade4f72f6
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Action/EscalatePriority.pm
diff --git a/lib/RT/Action/EscalatePriority.pm b/lib/RT/Action/EscalatePriority.pm
index 5f8f879..dc7ba11 100755
--- a/lib/RT/Action/EscalatePriority.pm
+++ b/lib/RT/Action/EscalatePriority.pm
@@ -156,6 +156,7 @@ sub Commit {
unless ($val) {
$RT::Logger->debug($self . " $msg");
}
+ return (1);
}
RT::Base->_ImportOverlays();
commit 157169c5d92034426b0710e3bbf985b2250a310d
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Action/Notify.pm
diff --git a/lib/RT/Action/Notify.pm b/lib/RT/Action/Notify.pm
index 3f58bf5..8faf8c5 100755
--- a/lib/RT/Action/Notify.pm
+++ b/lib/RT/Action/Notify.pm
@@ -66,7 +66,7 @@ Set up the relevant recipients, then call our parent.
sub Prepare {
my $self = shift;
$self->SetRecipients();
- $self->SUPER::Prepare();
+ return $self->SUPER::Prepare();
}
=head2 SetRecipients
@@ -157,9 +157,8 @@ sub SetRecipients {
@{ $self->{'Cc'} } = grep ( lc $_ ne lc $creator, @Cc );
@{ $self->{'Bcc'} } = grep ( lc $_ ne lc $creator, @Bcc );
}
- @{ $self->{'PseudoTo'} } = @PseudoTo;
-
-
+ # XXX 4.2: return;
+ return @{ $self->{'PseudoTo'} } = @PseudoTo;
}
RT::Base->_ImportOverlays();
commit 4c217bfa1caa6703556c12d9a88ec75d4735a778
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Action/NotifyGroup.pm
diff --git a/lib/RT/Action/NotifyGroup.pm b/lib/RT/Action/NotifyGroup.pm
index 6bd903f..db82b05 100644
--- a/lib/RT/Action/NotifyGroup.pm
+++ b/lib/RT/Action/NotifyGroup.pm
@@ -169,6 +169,7 @@ sub __HandleUserArgument {
return;
}
$self->__PushUserAddress( $uea );
+ return;
}
sub __HandleGroupArgument {
@@ -179,6 +180,7 @@ sub __HandleGroupArgument {
while( my $m = $members->Next ) {
$self->__HandleUserArgument( $m );
}
+ return;
}
sub __SplitArg {
commit 4e76efa287d449c2229098c4d962c81019309d89
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Action/RecordComment.pm
diff --git a/lib/RT/Action/RecordComment.pm b/lib/RT/Action/RecordComment.pm
index 5d3664d..4ba5a6f 100644
--- a/lib/RT/Action/RecordComment.pm
+++ b/lib/RT/Action/RecordComment.pm
@@ -95,7 +95,7 @@ used by the scrips that actually send the email.
sub Commit {
my $self = shift;
- $self->CreateTransaction();
+ return $self->CreateTransaction();
}
sub CreateTransaction {
@@ -107,7 +107,7 @@ sub CreateTransaction {
my ($trans, $desc, $transaction) = $self->{'TicketObj'}->Comment(
MIMEObj => $self->TemplateObj->MIMEObj);
- $self->{'TransactionObj'} = $transaction;
+ return $self->{'TransactionObj'} = $transaction;
}
commit a1121325f34902c1dacffbcbb01aec17df0b9945
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Action/RecordCorrespondence.pm
diff --git a/lib/RT/Action/RecordCorrespondence.pm b/lib/RT/Action/RecordCorrespondence.pm
index 109c0df..72cbcc4 100644
--- a/lib/RT/Action/RecordCorrespondence.pm
+++ b/lib/RT/Action/RecordCorrespondence.pm
@@ -96,7 +96,7 @@ be used by the scrips that actually send the email.
sub Commit {
my $self = shift;
- $self->CreateTransaction();
+ return $self->CreateTransaction();
}
sub CreateTransaction {
@@ -108,7 +108,7 @@ sub CreateTransaction {
my ($trans, $desc, $transaction) = $self->{'TicketObj'}->Correspond(
MIMEObj => $self->TemplateObj->MIMEObj);
- $self->{'TransactionObj'} = $transaction;
+ return $self->{'TransactionObj'} = $transaction;
}
commit 601e49eaccb5a3126dc69e1e5e251e7713f55717
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Action/ResolveMembers.pm
diff --git a/lib/RT/Action/ResolveMembers.pm b/lib/RT/Action/ResolveMembers.pm
index aff6365..49e98fa 100755
--- a/lib/RT/Action/ResolveMembers.pm
+++ b/lib/RT/Action/ResolveMembers.pm
@@ -89,6 +89,7 @@ sub Commit {
# I'm afraid this might be a major bottleneck if ResolveGroupTicket is on.
$base->Resolve;
}
+ return 1;
}
@@ -96,8 +97,6 @@ sub Commit {
# {{{ sub IsApplicable
sub IsApplicable {
- my $self = shift;
- 1;
return 1;
}
# }}}
commit f251ac850313cc4023fc8eba84c3f4e268707e03
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Action/SendEmail.pm
diff --git a/lib/RT/Action/SendEmail.pm b/lib/RT/Action/SendEmail.pm
index 9e93e4a..a7ebfa4 100755
--- a/lib/RT/Action/SendEmail.pm
+++ b/lib/RT/Action/SendEmail.pm
@@ -88,6 +88,7 @@ sub CleanSlate {
my $self = shift;
$self->SquelchMailTo(undef);
$self->AttachTickets(undef);
+ return;
}
=head2 Commit
@@ -395,6 +396,7 @@ sub AddAttachments {
}
$self->AddAttachment($attach);
}
+ return;
}
=head2 AddAttachment $attachment
@@ -419,6 +421,7 @@ sub AddAttachment {
. $attach->id,
Encoding => '-SUGGEST',
);
+ return;
}
=head2 AttachTickets [@IDs]
@@ -628,7 +631,7 @@ sub SetRTSpecialHeaders {
) {
$self->SetHeader( 'RT-Originator', $email );
}
-
+ return;
}
@@ -706,6 +709,7 @@ sub DeferDigestRecipients {
. "transaction #"
. $self->TransactionObj->id );
}
+ return;
}
@@ -834,6 +838,7 @@ sub RemoveInappropriateRecipients {
}
@{ $self->{$type} } = @addrs;
}
+ return;
}
=head2 SetReturnAddress is_comment => BOOLEAN
@@ -893,7 +898,7 @@ sub SetReturnAddress {
unless ( $self->TemplateObj->MIMEObj->head->get('Reply-To') ) {
$self->SetHeader( 'Reply-To', "$replyto" );
}
-
+ return;
}
=head2 SetHeader FIELD, VALUE
@@ -953,7 +958,7 @@ sub SetSubject {
$subject =~ s/(\r\n|\n|\s)/ /g;
$self->SetHeader( 'Subject', $subject );
-
+ return;
}
=head2 SetSubjectToken
@@ -972,6 +977,7 @@ sub SetSubjectToken {
$self->TicketObj,
),
);
+ return;
}
=head2 SetReferencesHeaders
@@ -1041,7 +1047,7 @@ sub SetReferencesHeaders {
# Add on the references
$self->SetHeader( 'References', join( " ", @references ) );
$self->TemplateObj->MIMEObj->head->fold_length( 'References', 80 );
-
+ return;
}
=head2 PseudoReference
@@ -1080,7 +1086,7 @@ sub SetHeaderAsEncoding {
my $value = $head->get( $field );
$value = $self->MIMEEncodeString( $value, $enc );
$head->replace( $field, $value );
-
+ return;
}
=head2 MIMEEncodeString
commit 0737898e6f94dbaae69a151c48a165eb1880144c
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Action/SetPriority.pm
diff --git a/lib/RT/Action/SetPriority.pm b/lib/RT/Action/SetPriority.pm
index 420f9bd..c913283 100755
--- a/lib/RT/Action/SetPriority.pm
+++ b/lib/RT/Action/SetPriority.pm
@@ -73,7 +73,7 @@ sub Prepare {
sub Commit {
my $self = shift;
$self->TicketObj->SetPriority($self->Argument);
-
+ return 1;
}
RT::Base->_ImportOverlays();
commit 58ee776ed434ac5c762d630e3b0c36b14f6915e4
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Approval/Rule.pm
diff --git a/lib/RT/Approval/Rule.pm b/lib/RT/Approval/Rule.pm
index 4201240..3334c22 100644
--- a/lib/RT/Approval/Rule.pm
+++ b/lib/RT/Approval/Rule.pm
@@ -57,7 +57,7 @@ use constant _Queue => '___Approvals';
sub Prepare {
my $self = shift;
return unless $self->SUPER::Prepare();
- $self->TicketObj->Type eq 'approval';
+ return $self->TicketObj->Type eq 'approval';
}
sub GetTemplate {
commit 342492a57e6082628a3485ebf48fdd698a46598e
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Approval/Rule/Created.pm
diff --git a/lib/RT/Approval/Rule/Created.pm b/lib/RT/Approval/Rule/Created.pm
index 324061e..63ddb01 100644
--- a/lib/RT/Approval/Rule/Created.pm
+++ b/lib/RT/Approval/Rule/Created.pm
@@ -59,13 +59,14 @@ sub Prepare {
my $self = shift;
return unless $self->SUPER::Prepare();
- $self->TransactionObj->Type eq 'Create' &&
- !$self->TicketObj->HasUnresolvedDependencies( Type => 'approval' );
+ return $self->TransactionObj->Type eq 'Create'
+ && !$self->TicketObj->HasUnresolvedDependencies( Type => 'approval' );
}
sub Commit {
my $self = shift;
$self->RunScripAction('Open Tickets' => 'Blank');
+ return;
}
1;
commit 43740a5d4c68d377a2f322847a518981253a9831
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Approval/Rule/NewPending.pm
diff --git a/lib/RT/Approval/Rule/NewPending.pm b/lib/RT/Approval/Rule/NewPending.pm
index 8cb21dd..3a68f93 100644
--- a/lib/RT/Approval/Rule/NewPending.pm
+++ b/lib/RT/Approval/Rule/NewPending.pm
@@ -57,8 +57,8 @@ sub Prepare {
my $self = shift;
return unless $self->SUPER::Prepare();
- $self->OnStatusChange('open') and
- eval { $T::Approving = ($self->TicketObj->AllDependedOnBy( Type => 'ticket' ))[0] }
+ return $self->OnStatusChange('open') and
+ eval { $T::Approving = ($self->TicketObj->AllDependedOnBy( Type => 'ticket' ))[0] };
}
sub Commit {
commit 582076a44e97ccf6029fbdf270897259fc758d31
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Approval/Rule/Passed.pm
diff --git a/lib/RT/Approval/Rule/Passed.pm b/lib/RT/Approval/Rule/Passed.pm
index 1618e6e..c664a84 100644
--- a/lib/RT/Approval/Rule/Passed.pm
+++ b/lib/RT/Approval/Rule/Passed.pm
@@ -57,7 +57,7 @@ sub Prepare {
my $self = shift;
return unless $self->SUPER::Prepare();
- $self->OnStatusChange('resolved');
+ return $self->OnStatusChange('resolved');
}
sub Commit {
commit 890908d9e82b2d1ecab4fcf9ce772ebc237e8f0a
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Approval/Rule/Rejected.pm
diff --git a/lib/RT/Approval/Rule/Rejected.pm b/lib/RT/Approval/Rule/Rejected.pm
index b10f5f0..d5ed862 100644
--- a/lib/RT/Approval/Rule/Rejected.pm
+++ b/lib/RT/Approval/Rule/Rejected.pm
@@ -58,7 +58,8 @@ sub Prepare {
return unless $self->SUPER::Prepare();
return (0)
- unless $self->OnStatusChange('rejected') or $self->OnStatusChange('deleted')
+ unless $self->OnStatusChange('rejected') or $self->OnStatusChange('deleted');
+ return (1);
}
sub Commit { # XXX: from custom prepare code
@@ -109,7 +110,7 @@ sub Commit { # XXX: from custom prepare code
);
}
}
-
+ return;
}
1;
commit 885466edd708034370b17802afbcf33f727e5ac6
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Attachment_Overlay.pm
diff --git a/lib/RT/Attachment_Overlay.pm b/lib/RT/Attachment_Overlay.pm
index 63dba30..86569ea 100644
--- a/lib/RT/Attachment_Overlay.pm
+++ b/lib/RT/Attachment_Overlay.pm
@@ -596,7 +596,7 @@ sub SetHeader {
}
$newheader .= "$tag: $_[0]\n" if defined $tag;
- $self->__Set( Field => 'Headers', Value => $newheader);
+ return $self->__Set( Field => 'Headers', Value => $newheader);
}
=head2 SplitHeaders
@@ -753,7 +753,7 @@ sub _Value {
# Transactions don't change. by adding this cache congif directiove,
# we don't lose pathalogically on long tickets.
sub _CacheConfig {
- {
+ return {
'cache_p' => 1,
'fast_update_p' => 1,
'cache_for_sec' => 180,
commit ced7d7c94e434e30d17f2559fcce0274093bef7b
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Attribute_Overlay.pm
diff --git a/lib/RT/Attribute_Overlay.pm b/lib/RT/Attribute_Overlay.pm
index 00c04b7..2ba60bb 100644
--- a/lib/RT/Attribute_Overlay.pm
+++ b/lib/RT/Attribute_Overlay.pm
@@ -311,7 +311,7 @@ sub DeleteSubValue {
my $key = shift;
my %values = $self->Content();
delete $values{$key};
- $self->SetContent(%values);
+ return $self->SetContent(%values);
@@ -327,7 +327,7 @@ Deletes all subvalues for this attribute
sub DeleteAllSubValues {
my $self = shift;
- $self->SetContent({});
+ return $self->SetContent({});
}
=head2 SetSubValues { }
@@ -349,7 +349,7 @@ sub SetSubValues {
$values->{$key} = $args{$key};
}
- $self->SetContent($values);
+ return $self->SetContent($values);
}
commit 5bf9e145ed8fa93095e9ac2b7d5f6a822250ab77
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Attributes_Overlay.pm
diff --git a/lib/RT/Attributes_Overlay.pm b/lib/RT/Attributes_Overlay.pm
index 5665237..eb240e8 100644
--- a/lib/RT/Attributes_Overlay.pm
+++ b/lib/RT/Attributes_Overlay.pm
@@ -78,9 +78,11 @@ sub _DoSearch {
$RT::Logger->crit(
"_DoSearch is not so successful as it still needs redo search, won't call _BuildAccessTable"
);
+ return;
}
else {
$self->_BuildAccessTable();
+ return 1;
}
}
@@ -91,6 +93,7 @@ sub _BuildAccessTable {
while (my $attr = $self->Next) {
push @{$self->{'attr'}->{$attr->Name}}, $attr;
}
+ return;
}
@@ -205,7 +208,7 @@ sub LimitToObject {
&& $obj->can('id') && $obj->id;
$self->Limit(FIELD => 'ObjectType', OPERATOR=> '=', VALUE => ref($obj), ENTRYAGGREGATOR => 'OR');
$self->Limit(FIELD => 'ObjectId', OPERATOR=> '=', VALUE => $obj->id, ENTRYAGGREGATOR => 'OR', QUOTEVALUE => 0);
-
+ return 1;
}
# }}}
commit ad4508f3e87f4faf97781cd54df499a25d1fe379
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/Base.pm
diff --git a/lib/RT/Base.pm b/lib/RT/Base.pm
index c7fc66e..115981d 100755
--- a/lib/RT/Base.pm
+++ b/lib/RT/Base.pm
@@ -173,6 +173,7 @@ sub _ImportOverlays {
eval { require $filename };
die $@ if ($@ && $@ !~ qr{^Can't locate $filename});
}
+ return;
}
__PACKAGE__->_ImportOverlays();
commit a6b2494f8379ce8825699b729d394afb13ba5209
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:23 2011 -0400
Explicit returns for lib/RT/CachedGroupMembers_Overlay.pm
diff --git a/lib/RT/CachedGroupMembers_Overlay.pm b/lib/RT/CachedGroupMembers_Overlay.pm
index 452ac73..e412ffc 100755
--- a/lib/RT/CachedGroupMembers_Overlay.pm
+++ b/lib/RT/CachedGroupMembers_Overlay.pm
@@ -86,7 +86,7 @@ sub LimitToUsers {
$self->Join( ALIAS1 => 'main', FIELD1 => 'MemberId',
ALIAS2 => $principals, FIELD2 =>'id');
- $self->Limit( ALIAS => $principals,
+ return $self->Limit( ALIAS => $principals,
FIELD => 'PrincipalType',
VALUE => 'User',
ENTRYAGGREGATOR => 'OR',
@@ -113,7 +113,7 @@ sub LimitToGroups {
$self->Join( ALIAS1 => 'main', FIELD1 => 'MemberId',
ALIAS2 => $principals, FIELD2 =>'id');
- $self->Limit( ALIAS => $principals,
+ return $self->Limit( ALIAS => $principals,
FIELD => 'PrincipalType',
VALUE => 'Group',
ENTRYAGGREGATOR => 'OR',
commit d4e27a96b73d9c8c4ada0921eec54e8ec12e5f7a
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Config.pm
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 6d18070..822491c 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -637,6 +637,7 @@ sub PostLoadCheck {
foreach my $o ( grep $META{$_}{'PostLoadCheck'}, $self->Options( Overridable => undef ) ) {
$META{$o}->{'PostLoadCheck'}->( $self, $self->Get($o) );
}
+ return;
}
=head2 Configs
commit 0714f325f320c7daf9b68dd13c1dcb25bef0a8ea
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/CustomField_Overlay.pm
diff --git a/lib/RT/CustomField_Overlay.pm b/lib/RT/CustomField_Overlay.pm
index a82921d..54015a1 100755
--- a/lib/RT/CustomField_Overlay.pm
+++ b/lib/RT/CustomField_Overlay.pm
@@ -136,6 +136,7 @@ sub AddRights {
$RIGHTS = { %$RIGHTS, %new };
%RT::ACE::LOWERCASERIGHTNAMES = ( %RT::ACE::LOWERCASERIGHTNAMES,
map { lc($_) => $_ } keys %new);
+ return;
}
sub AvailableRights {
@@ -502,7 +503,7 @@ sub IsSelectionType {
my $type = @_? shift : $self->Type;
return undef unless $type;
- $type =~ /(?:Select|Combobox|Autocomplete)/;
+ return $type =~ /(?:Select|Combobox|Autocomplete)/;
}
# }}}
@@ -603,7 +604,7 @@ sub SetType {
$RT::Logger->warning("'Single' and 'Multiple' on SetType deprecated, use SetMaxValues instead at (". join(":",caller).")");
$self->SetMaxValues($1 ? 1 : 0);
}
- $self->SUPER::SetType($type);
+ return $self->SUPER::SetType($type);
}
=head2 SetPattern STRING
@@ -1328,8 +1329,7 @@ sub _ForObjectType {
my $path = shift;
my $friendly_name = shift;
- $FRIENDLY_OBJECT_TYPES{$path} = $friendly_name;
-
+ return $FRIENDLY_OBJECT_TYPES{$path} = $friendly_name;
}
@@ -1342,11 +1342,11 @@ as they display records with custom fields in RT.
=cut
sub SetIncludeContentForValue {
- shift->IncludeContentForValue(@_);
+ return shift->IncludeContentForValue(@_);
}
sub IncludeContentForValue{
my $self = shift;
- $self->_URLTemplate('IncludeContentForValue', @_);
+ return $self->_URLTemplate('IncludeContentForValue', @_);
}
@@ -1361,12 +1361,12 @@ browser as they display records with custom fields in RT.
sub SetLinkValueTo {
- shift->LinkValueTo(@_);
+ return shift->LinkValueTo(@_);
}
sub LinkValueTo {
my $self = shift;
- $self->_URLTemplate('LinkValueTo', @_);
+ return $self->_URLTemplate('LinkValueTo', @_);
}
commit 6cf18e2fab2fc44c1f6de64b0d5980ac6d24d188
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/CustomFields_Overlay.pm
diff --git a/lib/RT/CustomFields_Overlay.pm b/lib/RT/CustomFields_Overlay.pm
index e1dd977..dac0f5b 100755
--- a/lib/RT/CustomFields_Overlay.pm
+++ b/lib/RT/CustomFields_Overlay.pm
@@ -90,7 +90,7 @@ sub LimitToLookupType {
my $self = shift;
my $lookup = shift;
- $self->Limit( FIELD => 'LookupType', VALUE => "$lookup" );
+ return $self->Limit( FIELD => 'LookupType', VALUE => "$lookup" );
}
=head2 LimitToChildType
@@ -105,7 +105,8 @@ sub LimitToChildType {
my $lookup = shift;
$self->Limit( FIELD => 'LookupType', VALUE => "$lookup" );
- $self->Limit( FIELD => 'LookupType', ENDSWITH => "$lookup" );
+ # XXX 4.2: return;
+ return $self->Limit( FIELD => 'LookupType', ENDSWITH => "$lookup" );
}
@@ -121,7 +122,8 @@ sub LimitToParentType {
my $lookup = shift;
$self->Limit( FIELD => 'LookupType', VALUE => "$lookup" );
- $self->Limit( FIELD => 'LookupType', STARTSWITH => "$lookup" );
+ # XXX 4.2: return;
+ return $self->Limit( FIELD => 'LookupType', STARTSWITH => "$lookup" );
}
@@ -151,6 +153,7 @@ sub LimitToGlobalOrObjectId {
OPERATOR => '=',
VALUE => 0,
ENTRYAGGREGATOR => 'OR' ) unless $global_only;
+ return;
}
=head2 LimitToNotApplied
@@ -180,7 +183,8 @@ sub LimitToNotApplied {
);
}
- $self->Limit(
+ # XXX 4.2: return;
+ return $self->Limit(
ENTRYAGGREGATOR => 'AND',
ALIAS => $ocfs_alias,
FIELD => 'id',
@@ -201,7 +205,8 @@ sub LimitToGlobalOrQueue {
my $self = shift;
my $queue = shift;
$self->LimitToGlobalOrObjectId( $queue );
- $self->LimitToLookupType( 'RT::Queue-RT::Ticket' );
+ # XXX 4.2: return;
+ return $self->LimitToLookupType( 'RT::Queue-RT::Ticket' );
}
@@ -224,7 +229,8 @@ sub LimitToQueue {
FIELD => 'ObjectId',
VALUE => "$queue")
if defined $queue;
- $self->LimitToLookupType( 'RT::Queue-RT::Ticket' );
+ # XXX 4.2: return;
+ return $self->LimitToLookupType( 'RT::Queue-RT::Ticket' );
}
@@ -245,7 +251,8 @@ sub LimitToGlobal {
ENTRYAGGREGATOR => 'OR',
FIELD => 'ObjectId',
VALUE => 0);
- $self->LimitToLookupType( 'RT::Queue-RT::Ticket' );
+ # XXX 4.2: return;
+ return $self->LimitToLookupType( 'RT::Queue-RT::Ticket' );
}
@@ -261,7 +268,7 @@ L<RT::CustomField/LookupType> and applied to one object or globally
sub ApplySortOrder {
my $self = shift;
my $order = shift || 'ASC';
- $self->OrderByCols( {
+ return $self->OrderByCols( {
ALIAS => $self->_OCFAlias,
FIELD => 'SortOrder',
ORDER => $order,
commit 066726cff24cc43849b0435df6e649b7ccb11dc2
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Dashboard.pm
diff --git a/lib/RT/Dashboard.pm b/lib/RT/Dashboard.pm
index 9fb2e60..a87ab69 100644
--- a/lib/RT/Dashboard.pm
+++ b/lib/RT/Dashboard.pm
@@ -95,7 +95,7 @@ An object of this class is called "dashboard"
=cut
-sub ObjectName { "dashboard" }
+sub ObjectName { return "dashboard" }
sub SaveAttribute {
my $self = shift;
@@ -319,35 +319,35 @@ sub CurrentUserCanSee {
my $self = shift;
my $privacy = shift;
- $self->_CurrentUserCan($privacy, Right => 'See');
+ return $self->_CurrentUserCan($privacy, Right => 'See');
}
sub CurrentUserCanCreate {
my $self = shift;
my $privacy = shift;
- $self->_CurrentUserCan($privacy, Right => 'Create');
+ return $self->_CurrentUserCan($privacy, Right => 'Create');
}
sub CurrentUserCanModify {
my $self = shift;
my $privacy = shift;
- $self->_CurrentUserCan($privacy, Right => 'Modify');
+ return $self->_CurrentUserCan($privacy, Right => 'Modify');
}
sub CurrentUserCanDelete {
my $self = shift;
my $privacy = shift;
- $self->_CurrentUserCan($privacy, Right => 'Delete');
+ return $self->_CurrentUserCan($privacy, Right => 'Delete');
}
sub CurrentUserCanSubscribe {
my $self = shift;
my $privacy = shift;
- $self->_CurrentUserCan($privacy, FullRight => 'SubscribeDashboard');
+ return $self->_CurrentUserCan($privacy, FullRight => 'SubscribeDashboard');
}
RT::Base->_ImportOverlays();
commit 6df6dfc8245f1a11cab04421089e976cb5e0439b
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/EmailParser.pm
diff --git a/lib/RT/EmailParser.pm b/lib/RT/EmailParser.pm
index ec91541..26af611 100755
--- a/lib/RT/EmailParser.pm
+++ b/lib/RT/EmailParser.pm
@@ -224,6 +224,7 @@ sub _DecodeBodies {
my @parts = $self->{'entity'}->parts_DFS;
$self->_DecodeBody($_) foreach @parts;
+ return;
}
sub _DecodeBody {
@@ -258,7 +259,7 @@ sub _DecodeBody {
$source->close or die "can't close: $!";
$destination->close or die "can't close: $!";
- $entity->bodyhandle( $new );
+ return $entity->bodyhandle( $new );
}
=head2 _PostProcessNewEntity
@@ -278,7 +279,7 @@ sub _PostProcessNewEntity {
$self->Head->unfold;
# try to convert text parts into utf-8 charset
- RT::I18N::SetMIMEEntityToEncoding($self->{'entity'}, 'utf-8');
+ return RT::I18N::SetMIMEEntityToEncoding($self->{'entity'}, 'utf-8');
}
=head2 ParseCcAddressesFromHead HASHREF
@@ -516,7 +517,7 @@ sub _SetupMIMEParser {
$parser->tmp_to_core(1);
$parser->use_inner_files(1);
}
-
+ return;
}
=head2 ParseEmailAddress string
commit 1386549ca73d153d4ecc40a4b29acf09a17742cf
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Graph/Tickets.pm
diff --git a/lib/RT/Graph/Tickets.pm b/lib/RT/Graph/Tickets.pm
index bacb758..3cea972 100644
--- a/lib/RT/Graph/Tickets.pm
+++ b/lib/RT/Graph/Tickets.pm
@@ -260,7 +260,7 @@ sub AddTicket {
}
}
- $args{'Graph'}->add_node( $args{'Ticket'}->id, %node_style );
+ return $args{'Graph'}->add_node( $args{'Ticket'}->id, %node_style );
}
sub TicketLinks {
commit c4ee4e25c468ad4ab497b970e83b7a9fe4284762
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/GroupMembers_Overlay.pm
diff --git a/lib/RT/GroupMembers_Overlay.pm b/lib/RT/GroupMembers_Overlay.pm
index 0b9d44c..f3d5a75 100755
--- a/lib/RT/GroupMembers_Overlay.pm
+++ b/lib/RT/GroupMembers_Overlay.pm
@@ -86,7 +86,7 @@ sub LimitToUsers {
$self->Join( ALIAS1 => 'main', FIELD1 => 'MemberId',
ALIAS2 => $principals, FIELD2 =>'id');
- $self->Limit( ALIAS => $principals,
+ return $self->Limit( ALIAS => $principals,
FIELD => 'PrincipalType',
VALUE => 'User',
ENTRYAGGREGATOR => 'OR',
@@ -113,7 +113,7 @@ sub LimitToGroups {
$self->Join( ALIAS1 => 'main', FIELD1 => 'MemberId',
ALIAS2 => $principals, FIELD2 =>'id');
- $self->Limit( ALIAS => $principals,
+ return $self->Limit( ALIAS => $principals,
FIELD => 'PrincipalType',
VALUE => 'Group',
ENTRYAGGREGATOR => 'OR',
commit 0ed5d57e58822bff0423fa6b2f0d6a0553d695b1
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Group_Overlay.pm
diff --git a/lib/RT/Group_Overlay.pm b/lib/RT/Group_Overlay.pm
index 74f44c2..d878a57 100755
--- a/lib/RT/Group_Overlay.pm
+++ b/lib/RT/Group_Overlay.pm
@@ -126,6 +126,7 @@ sub AddRights {
$RIGHTS = { %$RIGHTS, %new };
%RT::ACE::LOWERCASERIGHTNAMES = ( %RT::ACE::LOWERCASERIGHTNAMES,
map { lc($_) => $_ } keys %new);
+ return;
}
=head2 AvailableRights
@@ -199,7 +200,7 @@ sub Load {
my $identifier = shift || return undef;
if ( $identifier !~ /\D/ ) {
- $self->SUPER::LoadById($identifier);
+ return $self->SUPER::LoadById($identifier);
}
else {
$RT::Logger->crit("Group -> Load called with a bogus argument");
@@ -279,6 +280,7 @@ sub LoadPersonalGroup {
User => undef,
@_);
+ return
$self->LoadByCols( "Domain" => 'Personal',
"Instance" => $args{'User'},
"Type" => '',
@@ -328,6 +330,7 @@ sub LoadTicketRoleGroup {
my %args = (Ticket => '0',
Type => undef,
@_);
+ return
$self->LoadByCols( Domain => 'RT::Ticket-Role',
Instance =>$args{'Ticket'},
Type => $args{'Type'}
@@ -355,6 +358,7 @@ sub LoadQueueRoleGroup {
my %args = (Queue => undef,
Type => undef,
@_);
+ return
$self->LoadByCols( Domain => 'RT::Queue-Role',
Instance =>$args{'Queue'},
Type => $args{'Type'}
@@ -379,6 +383,7 @@ Takes a single param: Type
sub LoadSystemRoleGroup {
my $self = shift;
my $type = shift;
+ return
$self->LoadByCols( Domain => 'RT::System-Role',
Type => $type
);
@@ -745,7 +750,7 @@ This routine finds all the cached group members that are members of this group
sub Disabled {
my $self = shift;
- $self->PrincipalObj->Disabled(@_);
+ return $self->PrincipalObj->Disabled(@_);
}
@@ -957,7 +962,7 @@ sub AddMember {
}
}
- $self->_AddMember(PrincipalId => $new_member);
+ return $self->_AddMember(PrincipalId => $new_member);
}
# A helper subroutine for AddMember that bypasses the ACL checks
@@ -1150,7 +1155,7 @@ sub DeleteMember {
return ( 0, $self->loc("Permission Denied") );
}
}
- $self->_DeleteMember($member_id);
+ return $self->_DeleteMember($member_id);
}
# A helper subroutine for DeleteMember that bypasses the ACL checks
@@ -1380,7 +1385,7 @@ sub PrincipalId {
# }}}
sub BasicColumns {
- (
+ return (
[ Name => 'Name' ],
[ Description => 'Description' ],
);
commit f6d421d82fdebf87ff474c34e301d2c10f307e95
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Groups_Overlay.pm
diff --git a/lib/RT/Groups_Overlay.pm b/lib/RT/Groups_Overlay.pm
index 62a6bcb..f1f53ec 100755
--- a/lib/RT/Groups_Overlay.pm
+++ b/lib/RT/Groups_Overlay.pm
@@ -141,7 +141,7 @@ Return only SystemInternal Groups, such as "privileged" "unprivileged" and "ever
sub LimitToSystemInternalGroups {
my $self = shift;
- $self->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'SystemInternal');
+ return $self->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'SystemInternal');
# All system internal groups have the same instance. No reason to limit down further
#$self->Limit(FIELD => 'Instance', OPERATOR => '=', VALUE => '0');
}
@@ -160,7 +160,7 @@ Return only UserDefined Groups
sub LimitToUserDefinedGroups {
my $self = shift;
- $self->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined');
+ return $self->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined');
# All user-defined groups have the same instance. No reason to limit down further
#$self->Limit(FIELD => 'Instance', OPERATOR => '=', VALUE => '');
}
@@ -183,9 +183,10 @@ sub LimitToPersonalGroupsFor {
my $princ = shift;
$self->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'Personal');
- $self->Limit( FIELD => 'Instance',
- OPERATOR => '=',
- VALUE => $princ);
+ # XXX 4.2: return;
+ return $self->Limit( FIELD => 'Instance',
+ OPERATOR => '=',
+ VALUE => $princ);
}
@@ -203,7 +204,8 @@ sub LimitToRolesForQueue {
my $self = shift;
my $queue = shift;
$self->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'RT::Queue-Role');
- $self->Limit(FIELD => 'Instance', OPERATOR => '=', VALUE => $queue);
+ # XXX 4.2: return;
+ return $self->Limit(FIELD => 'Instance', OPERATOR => '=', VALUE => $queue);
}
# }}}
@@ -220,7 +222,8 @@ sub LimitToRolesForTicket {
my $self = shift;
my $Ticket = shift;
$self->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'RT::Ticket-Role');
- $self->Limit(FIELD => 'Instance', OPERATOR => '=', VALUE => '$Ticket');
+ # XXX 4.2: return;
+ return $self->Limit(FIELD => 'Instance', OPERATOR => '=', VALUE => '$Ticket');
}
# }}}
@@ -235,7 +238,7 @@ Limits the set of groups found to role groups for System System_ID
sub LimitToRolesForSystem {
my $self = shift;
- $self->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'RT::System-Role');
+ return $self->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'RT::System-Role');
}
# }}}
@@ -262,7 +265,7 @@ sub WithMember {
$self->Join(ALIAS1 => 'main', FIELD1 => 'id',
ALIAS2 => $members, FIELD2 => 'GroupId');
- $self->Limit(ALIAS => $members, FIELD => 'MemberId', OPERATOR => '=', VALUE => $args{'PrincipalId'});
+ return $self->Limit(ALIAS => $members, FIELD => 'MemberId', OPERATOR => '=', VALUE => $args{'PrincipalId'});
}
sub WithoutMember {
@@ -287,7 +290,8 @@ sub WithoutMember {
OPERATOR => '=',
VALUE => $args{'PrincipalId'},
);
- $self->Limit(
+ # XXX 4.2: return;
+ return $self->Limit(
ALIAS => $members_alias,
FIELD => 'MemberId',
OPERATOR => 'IS',
@@ -354,11 +358,12 @@ sub _JoinGroupMembersForGroupRights {
unless( $group_members eq 'main' ) {
return $self->RT::Users::_JoinGroupMembersForGroupRights( %args );
}
- $self->Limit( ALIAS => $args{'ACLAlias'},
- FIELD => 'PrincipalId',
- VALUE => "main.id",
- QUOTEVALUE => 0,
- );
+ return $self->Limit(
+ ALIAS => $args{'ACLAlias'},
+ FIELD => 'PrincipalId',
+ VALUE => "main.id",
+ QUOTEVALUE => 0,
+ );
}
sub _JoinACL { return (shift)->RT::Users::_JoinACL( @_ ) }
sub _RoleClauses { return (shift)->RT::Users::_RoleClauses( @_ ) }
@@ -379,7 +384,7 @@ sub LimitToEnabled {
my $self = shift;
$self->{'handled_disabled_column'} = 1;
- $self->Limit(
+ return $self->Limit(
ALIAS => $self->PrincipalsAlias,
FIELD => 'Disabled',
VALUE => '0',
@@ -399,7 +404,7 @@ sub LimitToDeleted {
my $self = shift;
$self->{'handled_disabled_column'} = $self->{'find_disabled_rows'} = 1;
- $self->Limit(
+ return $self->Limit(
ALIAS => $self->PrincipalsAlias,
FIELD => 'Disabled',
VALUE => 1,
commit c134f783af8bd383ad338661a0c6957f4947a6b9
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Handle.pm
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 500adbe..b731031 100755
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -128,8 +128,8 @@ sub Connect {
}
-
- $self->dbh->{'LongReadLen'} = RT->Config->Get('MaxAttachmentSize');
+ # XXX 4.2: return;
+ return $self->dbh->{'LongReadLen'} = RT->Config->Get('MaxAttachmentSize');
}
=head2 BuildDSN
@@ -164,7 +164,7 @@ sub BuildDSN {
if ( $db_type eq 'Oracle' && $db_host ) {
$args{'SID'} = delete $args{'Database'};
}
- $self->SUPER::BuildDSN( %args );
+ return $self->SUPER::BuildDSN( %args );
}
=head2 DSN
commit a984bde8a01b6dfd778106772ee4c0b9caa1cd45
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/I18N.pm
diff --git a/lib/RT/I18N.pm b/lib/RT/I18N.pm
index 42263eb..b4559c0 100755
--- a/lib/RT/I18N.pm
+++ b/lib/RT/I18N.pm
@@ -145,6 +145,7 @@ sub LoadLexicons {
# TODO: untie that has to lower fetch impact
# untie %$lex if tied %$lex;
}
+ return;
}
=head2 encoding
@@ -157,7 +158,7 @@ If it can't find anything, it returns 'ISO-8859-1'
=cut
-sub encoding { 'utf-8' }
+sub encoding { return 'utf-8' }
# {{{ SetMIMEEntityToUTF8
@@ -169,7 +170,7 @@ It's now a wrap-up of SetMIMEEntityToEncoding($entity, 'utf-8').
=cut
sub SetMIMEEntityToUTF8 {
- RT::I18N::SetMIMEEntityToEncoding(shift, 'utf-8');
+ return RT::I18N::SetMIMEEntityToEncoding(shift, 'utf-8');
}
# }}}
@@ -192,7 +193,7 @@ Currently, it returns true iff $type matches this regular expression
sub IsTextualContentType {
my $type = shift;
- ($type =~ m{^(?:text/(?:plain|html)|message/rfc822)\b}i) ? 1 : 0;
+ return ($type =~ m{^(?:text/(?:plain|html)|message/rfc822)\b}i) ? 1 : 0;
}
# {{{ SetMIMEEntityToEncoding
@@ -292,6 +293,7 @@ sub SetMIMEEntityToEncoding {
$head->mime_attr( "content-type.charset" => $enc );
$entity->bodyhandle($new_body);
}
+ return;
}
# NOTES: Why Encode::_utf8_off before Encode::from_to
@@ -547,6 +549,7 @@ sub SetMIMEHeadToEncoding {
$head->add( $tag, $value );
}
}
+ return;
}
# }}}
commit 54c09430d2ed33537c1b94f218fa359b96f2d99a
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Interface/CLI.pm
diff --git a/lib/RT/Interface/CLI.pm b/lib/RT/Interface/CLI.pm
index 6c736f6..3a6ed53 100755
--- a/lib/RT/Interface/CLI.pm
+++ b/lib/RT/Interface/CLI.pm
@@ -115,6 +115,7 @@ sub CleanEnv {
$ENV{'SHELL'} = '/bin/sh' if defined $ENV{'SHELL'};
$ENV{'ENV'} = '' if defined $ENV{'ENV'};
$ENV{'IFS'} = '' if defined $ENV{'IFS'};
+ return;
}
commit 827d1b6ce971c628c39d997a1de306f079d01ccf
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Interface/Email.pm
diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index 9e62d0c..f136df2 100755
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -276,7 +276,7 @@ sub MailError {
}
- SendEmail( Entity => $entity, Bounce => 1 );
+ return SendEmail( Entity => $entity, Bounce => 1 );
}
@@ -1050,6 +1050,7 @@ sub ParseErrorsToAddressFromHead {
return ($addr) if ($addr);
}
}
+ return '';
}
@@ -1097,6 +1098,7 @@ sub DeleteRecipientsFromHead {
Email::Address->parse( $head->get( $field ) )
);
}
+ return;
}
sub GenMessageId {
@@ -1151,7 +1153,8 @@ sub SetInReplyTo {
my $mail = $args{'Message'};
$mail->head->set( 'In-Reply-To' => join ' ', @rtid? (@rtid) : (@id) ) if @id || @rtid;
- $mail->head->set( 'References' => join ' ', @references );
+ # XXX 4.2: return;
+ return $mail->head->set( 'References' => join ' ', @references );
}
sub ParseTicketId {
@@ -1688,6 +1691,7 @@ EOT
LogLevel => 'error'
);
}
+ return;
}
=head2 _HandleMachineGeneratedMail
commit 45f1040265a6ebe170c9c674f30517d3e270de1d
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Interface/REST.pm
diff --git a/lib/RT/Interface/REST.pm b/lib/RT/Interface/REST.pm
index 47c8de2..a747393 100755
--- a/lib/RT/Interface/REST.pm
+++ b/lib/RT/Interface/REST.pm
@@ -288,6 +288,7 @@ sub vpush {
else {
$hash->{$key} = $val;
}
+ return;
}
# "Normalise" a hash key that's known to be multi-valued.
commit cf3c225816a520a646b9e821a3b7558b0a9140a5
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Interface/Web.pm
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 29ce1c2..ab36830 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -247,11 +247,13 @@ sub HandleRequest {
# Process per-page final cleanup callbacks
$HTML::Mason::Commands::m->callback( %$ARGS, CallbackName => 'Final', CallbackPage => '/autohandler' );
+
+ return;
}
sub _ForceLogout {
- delete $HTML::Mason::Commands::session{'CurrentUser'};
+ return delete $HTML::Mason::Commands::session{'CurrentUser'};
}
sub _UserLoggedIn {
@@ -480,7 +482,7 @@ sub ShowRequestedPage {
} else {
$m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %$ARGS );
}
-
+ return;
}
sub AttemptExternalAuth {
@@ -648,13 +650,28 @@ sub LoadSessionFromCookie {
# save session on each request when AutoLogoff is turned on
$HTML::Mason::Commands::session{'_session_last_update'} = $now if $now != $last_update;
}
+ return;
}
+=head2 InstantiateNewSession
+
+Deletes the current session, if any, and creates a new (empty) one. Returns
+nothing.
+
+=cut
+
sub InstantiateNewSession {
tied(%HTML::Mason::Commands::session)->delete if tied(%HTML::Mason::Commands::session);
tie %HTML::Mason::Commands::session, 'RT::Interface::Web::Session', undef;
}
+=head2 SendSessionCookie
+
+Adds a C<Set-Cookie> header to the response so the session gets saved by the
+client. Returns nothing.
+
+=cut
+
sub SendSessionCookie {
my $cookie = CGI::Cookie->new(
-name => _SessionCookieName(),
@@ -742,6 +759,8 @@ sub StaticFileHeaders {
# Last modified at server start time
# $date->Set( Value => $^T );
# $HTML::Mason::Commands::r->headers_out->{'Last-Modified'} = $date->RFC2616;
+
+ return;
}
=head2 PathIsSafe
@@ -845,6 +864,7 @@ sub SendStaticFile {
$HTML::Mason::Commands::m->flush_buffer;
}
close $fh;
+ return;
}
sub StripContent {
@@ -899,7 +919,7 @@ sub StripContent {
sub DecodeARGS {
my $ARGS = shift;
- %{$ARGS} = map {
+ return %{$ARGS} = map {
# if they've passed multiple values, they'll be an array. if they've
# passed just one, a scalar whatever they are, mark them as utf8
@@ -943,7 +963,7 @@ sub PreprocessTimeUpdates {
}
delete $ARGS->{$field};
}
-
+ return;
}
sub MaybeEnableSQLStatementLog {
@@ -954,7 +974,7 @@ sub MaybeEnableSQLStatementLog {
$RT::Handle->ClearSQLStatementLog;
$RT::Handle->LogSQLStatements(1);
}
-
+ return;
}
sub LogRecordedSQLStatements {
@@ -982,7 +1002,7 @@ sub LogRecordedSQLStatements {
. ( @bind ? " [ bound values: @{[map{qq|'$_'|} @bind]} ]" : "" )
);
}
-
+ return;
}
package HTML::Mason::Commands;
commit f4d4ef0d149fc0ab95bb2dd7107fb788975f5999
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Interface/Web/Handler.pm
diff --git a/lib/RT/Interface/Web/Handler.pm b/lib/RT/Interface/Web/Handler.pm
index 19f3c46..14f9c65 100644
--- a/lib/RT/Interface/Web/Handler.pm
+++ b/lib/RT/Interface/Web/Handler.pm
@@ -64,7 +64,7 @@ use File::Path qw( rmtree );
use File::Glob qw( bsd_glob );
use File::Spec::Unix;
-sub DefaultHandlerArgs { (
+sub DefaultHandlerArgs { return (
comp_root => [
[ local => $RT::MasonLocalComponentRoot ],
(map {[ "plugin-".$_->Name => $_->ComponentRoot ]} @{RT->Plugins}),
@@ -124,7 +124,7 @@ sub InitSessionDir {
die "Can't read and write $RT::MasonSessionDir"
unless ( ( -d _ ) and ( -r _ ) and ( -w _ ) );
}
-
+ return;
}
# }}}
@@ -269,6 +269,8 @@ sub CleanupRequest {
# Explicitly remove any tmpfiles that GPG opened, and close their
# filehandles.
File::Temp::cleanup;
+
+ return;
}
# }}}
commit a964bd8a923f7baeb1e4825e904c2a6e2b9b97e2
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Interface/Web/Menu/Item.pm
diff --git a/lib/RT/Interface/Web/Menu/Item.pm b/lib/RT/Interface/Web/Menu/Item.pm
index 29fb13b..0e02e16 100644
--- a/lib/RT/Interface/Web/Menu/Item.pm
+++ b/lib/RT/Interface/Web/Menu/Item.pm
@@ -57,13 +57,13 @@ sub new {
return($self);
}
-sub label { my $self = shift; $self->_accessor( label => @_) } ;
-sub absolute_url { my $self = shift; $self->_accessor( absolute_url => @_) } ;
-sub rt_path { my $self = shift; $self->_accessor( rt_path => @_) } ;
+sub label { my $self = shift; return $self->_accessor( label => @_) } ;
+sub absolute_url { my $self = shift; return $self->_accessor( absolute_url => @_) } ;
+sub rt_path { my $self = shift; return $self->_accessor( rt_path => @_) } ;
sub hilight { my $self = shift; $self->_accessor( hilight => @_);
- $self->parent->hilight(1);
+ return $self->parent->hilight(1);
} ;
-sub sort_order { my $self = shift; $self->_accessor( sort_order => @_) } ;
+sub sort_order { my $self = shift; return $self->_accessor( sort_order => @_) } ;
sub add_child {
}
commit a732527e128ee9c00e9001b25888f613b6b2cd3f
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Interface/Web/QueryBuilder/Tree.pm
diff --git a/lib/RT/Interface/Web/QueryBuilder/Tree.pm b/lib/RT/Interface/Web/QueryBuilder/Tree.pm
index 493ab44..be03c7f 100755
--- a/lib/RT/Interface/Web/QueryBuilder/Tree.pm
+++ b/lib/RT/Interface/Web/QueryBuilder/Tree.pm
@@ -88,6 +88,8 @@ sub TraversePrePost {
}
$postfunc->($self) if $postfunc;
+
+ return;
}
=head2 GetReferencedQueues
@@ -173,6 +175,7 @@ sub PruneChildlessAggregators {
$node->DESTROY;
}
);
+ return;
}
=head2 GetDisplayedNodes
commit 73020770a87b95436beb675f92445c78b6011b7c
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Interface/Web/Session.pm
diff --git a/lib/RT/Interface/Web/Session.pm b/lib/RT/Interface/Web/Session.pm
index 0cce092..135f233 100644
--- a/lib/RT/Interface/Web/Session.pm
+++ b/lib/RT/Interface/Web/Session.pm
@@ -257,6 +257,7 @@ sub ClearByUser {
tied(%session)->delete;
$RT::Logger->info("successfuly deleted session '$id'");
}
+ return;
}
sub TIEHASH {
commit 16bbf6a971572095d2a75ddb10d3d87fddbce1f7
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Interface/Web/Standalone.pm
diff --git a/lib/RT/Interface/Web/Standalone.pm b/lib/RT/Interface/Web/Standalone.pm
index 3157e31..2954657 100755
--- a/lib/RT/Interface/Web/Standalone.pm
+++ b/lib/RT/Interface/Web/Standalone.pm
@@ -55,7 +55,7 @@ use RT::Interface::Web::Handler;
use RT::Interface::Web;
use URI;
-sub handler_class { "RT::Interface::Web::Handler" }
+sub handler_class { return "RT::Interface::Web::Handler" }
sub setup_escapes {
my $self = shift;
@@ -64,6 +64,7 @@ sub setup_escapes {
# Override HTTP::Server::Simple::Mason's version of this method to do
# nothing. (RT::Interface::Web::Handler does this already for us in
# NewHandler.)
+ return;
}
sub default_mason_config {
@@ -90,6 +91,7 @@ sub handle_request {
$RT::Logger->crit($@) if $@ && $RT::Logger;
warn $@ if $@ && !$RT::Logger;
RT::Interface::Web::Handler->CleanupRequest();
+ return;
}
sub net_server {
@@ -119,7 +121,7 @@ sub print_banner {
"You can connect to your server at "
. $url->canonical
. "\n" );
-
+ return;
}
commit d952c6dfebda93f608ae6c04a90c3685ef415a51
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Interface/Web/Standalone/PreFork.pm
diff --git a/lib/RT/Interface/Web/Standalone/PreFork.pm b/lib/RT/Interface/Web/Standalone/PreFork.pm
index f569e4f..a5c6d1d 100644
--- a/lib/RT/Interface/Web/Standalone/PreFork.pm
+++ b/lib/RT/Interface/Web/Standalone/PreFork.pm
@@ -97,7 +97,7 @@ sub post_bind_hook {
. (join ' , ', map { "http://localhost:$_/" } @ports)
. "\n";
- $self->SUPER::post_bind_hook(@_);
+ return $self->SUPER::post_bind_hook(@_);
}
1;
commit ecba2dd81095e517653d387cf82738d90aebf588
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/Links_Overlay.pm
diff --git a/lib/RT/Links_Overlay.pm b/lib/RT/Links_Overlay.pm
index 197da91..08c3b14 100755
--- a/lib/RT/Links_Overlay.pm
+++ b/lib/RT/Links_Overlay.pm
@@ -96,7 +96,7 @@ sub Limit {
}
- $self->SUPER::Limit(%args);
+ return $self->SUPER::Limit(%args);
}
# }}}
@@ -113,7 +113,8 @@ sub LimitRefersTo {
my $URI = shift;
$self->Limit(FIELD => 'Type', VALUE => 'RefersTo');
- $self->Limit(FIELD => 'Target', VALUE => $URI);
+ # XXX: 4.2 return;
+ return $self->Limit(FIELD => 'Target', VALUE => $URI);
}
# }}}
@@ -130,7 +131,8 @@ sub LimitReferredToBy {
my $URI = shift;
$self->Limit(FIELD => 'Type', VALUE => 'RefersTo');
- $self->Limit(FIELD => 'Base', VALUE => $URI);
+ # XXX: 4.2 return;
+ return $self->Limit(FIELD => 'Base', VALUE => $URI);
}
# }}}
commit 17486c45d8411b4cbc01bb782c225eaf61e59778
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/ObjectCustomField_Overlay.pm
diff --git a/lib/RT/ObjectCustomField_Overlay.pm b/lib/RT/ObjectCustomField_Overlay.pm
index 689d62f..40c24c0 100644
--- a/lib/RT/ObjectCustomField_Overlay.pm
+++ b/lib/RT/ObjectCustomField_Overlay.pm
@@ -113,7 +113,7 @@ sub Delete {
$OCF->SetSortOrder($this_order - 1);
}
- $self->SUPER::Delete;
+ return $self->SUPER::Delete;
}
sub CustomFieldObj {
commit 0449ec0c9b8ca3d7b7ebaef07ce7a2d43745d1e5
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:24 2011 -0400
Explicit returns for lib/RT/ObjectCustomFields_Overlay.pm
diff --git a/lib/RT/ObjectCustomFields_Overlay.pm b/lib/RT/ObjectCustomFields_Overlay.pm
index 3631a9a..2221b19 100644
--- a/lib/RT/ObjectCustomFields_Overlay.pm
+++ b/lib/RT/ObjectCustomFields_Overlay.pm
@@ -54,13 +54,13 @@ no warnings qw(redefine);
sub LimitToCustomField {
my $self = shift;
my $id = shift;
- $self->Limit( FIELD => 'CustomField', VALUE => $id );
+ return $self->Limit( FIELD => 'CustomField', VALUE => $id );
}
sub LimitToObjectId {
my $self = shift;
my $id = shift || 0;
- $self->Limit( FIELD => 'ObjectId', VALUE => $id );
+ return $self->Limit( FIELD => 'ObjectId', VALUE => $id );
}
sub LimitToLookupType {
@@ -73,7 +73,7 @@ sub LimitToLookupType {
TABLE2 => 'CustomFields',
FIELD2 => 'id',
);
- $self->Limit(
+ return $self->Limit(
ALIAS => $self->{'_cfs_alias'},
FIELD => 'LookupType',
OPERATOR => '=',
@@ -101,7 +101,7 @@ sub HasEntryForCustomField {
sub CustomFields {
my $self = shift;
my %seen;
- map { $_->CustomFieldObj } @{$self->ItemsArrayRef};
+ return map { $_->CustomFieldObj } @{$self->ItemsArrayRef};
}
sub _DoSearch {
@@ -112,7 +112,7 @@ sub _DoSearch {
OPERATOR => '!=',
VALUE => 1);
}
- $self->SUPER::_DoSearch()
+ return $self->SUPER::_DoSearch()
}
1;
commit e492d103afbaa3f557c6190bc8ee9ec345d56bc6
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Principal_Overlay.pm
diff --git a/lib/RT/Principal_Overlay.pm b/lib/RT/Principal_Overlay.pm
index 1ab6627..10e2af0 100755
--- a/lib/RT/Principal_Overlay.pm
+++ b/lib/RT/Principal_Overlay.pm
@@ -585,6 +585,7 @@ sub InvalidateACLCache {
my $lifetime;
$lifetime = $RT::Config->Get('ACLCacheLifetime') if $RT::Config;
$_ACL_CACHE->expire_after( $lifetime || 60 );
+ return;
}
# }}}
commit 2118a149f29b44e9364fda234186eeaf2758a7a6
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Queue_Overlay.pm
diff --git a/lib/RT/Queue_Overlay.pm b/lib/RT/Queue_Overlay.pm
index 00df1d5..e4e2839 100755
--- a/lib/RT/Queue_Overlay.pm
+++ b/lib/RT/Queue_Overlay.pm
@@ -140,6 +140,7 @@ sub AddRights {
$RIGHTS = { %$RIGHTS, %new };
%RT::ACE::LOWERCASERIGHTNAMES = ( %RT::ACE::LOWERCASERIGHTNAMES,
map { lc($_) => $_ } keys %new);
+ return;
}
sub AddLink {
commit c9a9dbbd694ddb9383194f25d13c7da8155a72df
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Queues_Overlay.pm
diff --git a/lib/RT/Queues_Overlay.pm b/lib/RT/Queues_Overlay.pm
index ff49192..09a10bb 100755
--- a/lib/RT/Queues_Overlay.pm
+++ b/lib/RT/Queues_Overlay.pm
@@ -90,7 +90,7 @@ sub Limit {
my $self = shift;
my %args = ( ENTRYAGGREGATOR => 'AND',
@_);
- $self->SUPER::Limit(%args);
+ return $self->SUPER::Limit(%args);
}
# }}}
@@ -109,7 +109,7 @@ sub AddRecord {
return unless $Queue->CurrentUserHasRight('SeeQueue');
push @{$self->{'items'}}, $Queue;
- $self->{'rows'}++;
+ return ++$self->{'rows'};
}
# }}}
commit cfddff073ede33d9318f345c3e9e17db45b8bd75
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Record.pm
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 6866b83..51ff750 100755
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -518,7 +518,7 @@ sub _Set {
=head2 _SetLastUpdated
This routine updates the LastUpdated and LastUpdatedBy columns of the row in question
-It takes no options. Arguably, this is a bug
+It takes no options. Arguably, this is a bug.
=cut
@@ -540,6 +540,7 @@ sub _SetLastUpdated {
Value => $self->CurrentUser->id
);
}
+ return;
}
# }}}
@@ -653,7 +654,7 @@ sub __Value {
# Set up defaults for DBIx::SearchBuilder::Record::Cachable
sub _CacheConfig {
- {
+ return {
'cache_p' => 1,
'cache_for_sec' => 30,
}
@@ -688,6 +689,7 @@ sub _BuildTableAttributes {
}
}
}
+ return;
}
@@ -1588,7 +1590,7 @@ $id is ID of created L<ObjectCustomFieldValue> object.
sub AddCustomFieldValue {
my $self = shift;
- $self->_AddCustomFieldValue(@_);
+ return $self->_AddCustomFieldValue(@_);
}
sub _AddCustomFieldValue {
commit 1092352eae418d29b85742db0f8b82600657921b
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Reminders.pm
diff --git a/lib/RT/Reminders.pm b/lib/RT/Reminders.pm
index edf3586..d812bef 100644
--- a/lib/RT/Reminders.pm
+++ b/lib/RT/Reminders.pm
@@ -129,11 +129,11 @@ sub Add {
Queue => $self->TicketObj->Queue,
);
- $self->TicketObj->_NewTransaction(Type => 'AddReminder',
- Field => 'RT::Ticket',
- NewValue => $reminder->id);
-
-
+ return $self->TicketObj->_NewTransaction(
+ Type => 'AddReminder',
+ Field => 'RT::Ticket',
+ NewValue => $reminder->id
+ );
}
@@ -142,9 +142,11 @@ sub Open {
my $reminder = shift;
$reminder->SetStatus('open');
- $self->TicketObj->_NewTransaction(Type => 'OpenReminder',
- Field => 'RT::Ticket',
- NewValue => $reminder->id);
+ return $self->TicketObj->_NewTransaction(
+ Type => 'OpenReminder',
+ Field => 'RT::Ticket',
+ NewValue => $reminder->id
+ );
}
@@ -152,9 +154,11 @@ sub Resolve {
my $self = shift;
my $reminder = shift;
$reminder->SetStatus('resolved');
- $self->TicketObj->_NewTransaction(Type => 'ResolveReminder',
- Field => 'RT::Ticket',
- NewValue => $reminder->id);
+ return $self->TicketObj->_NewTransaction(
+ Type => 'ResolveReminder',
+ Field => 'RT::Ticket',
+ NewValue => $reminder->id
+ );
}
RT::Base->_ImportOverlays();
commit 5dc393a9b99c27e942830c5a031cc66720731ac1
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Report/Tickets.pm
diff --git a/lib/RT/Report/Tickets.pm b/lib/RT/Report/Tickets.pm
index d229667..f258048 100644
--- a/lib/RT/Report/Tickets.pm
+++ b/lib/RT/Report/Tickets.pm
@@ -142,7 +142,7 @@ sub GroupBy {
@{ $self->{'_group_by_field'} ||= [] } = map $_->{'FIELD'}, @args;
$_ = { $self->_FieldToFunction( %$_ ) } foreach @args;
- $self->SUPER::GroupBy( @args );
+ return $self->SUPER::GroupBy( @args );
}
sub Column {
@@ -174,6 +174,7 @@ sub _DoSearch {
else {
$self->AddEmptyRows;
}
+ return $self->_RecordCount;
}
=head2 _FieldToFunction FIELD
@@ -279,7 +280,7 @@ sub AddRecord {
my $self = shift;
my $record = shift;
push @{$self->{'items'}}, $record;
- $self->{'rows'}++;
+ return ++$self->{'rows'};
}
1;
@@ -290,8 +291,7 @@ sub AddRecord {
# don't want.
sub Next {
my $self = shift;
- $self->RT::SearchBuilder::Next(@_);
-
+ return $self->RT::SearchBuilder::Next(@_);
}
sub NewItem {
@@ -322,6 +322,7 @@ sub AddEmptyRows {
$self->AddRecord($record);
}
}
+ return;
}
RT::Base->_ImportOverlays();
commit 1ac2e5e907cf9408b0079b4fb4ba5cd819cb73c6
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Report/Tickets/Entry.pm
diff --git a/lib/RT/Report/Tickets/Entry.pm b/lib/RT/Report/Tickets/Entry.pm
index ec97bc2..8477a97 100644
--- a/lib/RT/Report/Tickets/Entry.pm
+++ b/lib/RT/Report/Tickets/Entry.pm
@@ -53,7 +53,7 @@ use warnings;
use base qw/RT::Record/;
# XXX TODO: how the heck do we acl a report?
-sub CurrentUserHasRight {1}
+sub CurrentUserHasRight { return 1 }
=head2 LabelValue
commit 569153f3e5c0f4335e3baa3bd11dda2717d7cefe
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Rule.pm
diff --git a/lib/RT/Rule.pm b/lib/RT/Rule.pm
index 86ff63d..5130579 100644
--- a/lib/RT/Rule.pm
+++ b/lib/RT/Rule.pm
@@ -73,9 +73,9 @@ sub Describe {
sub OnStatusChange {
my ($self, $value) = @_;
- $self->TransactionObj->Type eq 'Status' and
- $self->TransactionObj->Field eq 'Status' and
- $self->TransactionObj->NewValue eq $value
+ return ($self->TransactionObj->Type eq 'Status' and
+ $self->TransactionObj->Field eq 'Status' and
+ $self->TransactionObj->NewValue eq $value)
}
sub RunScripAction {
@@ -101,8 +101,7 @@ sub RunScripAction {
$action->{'TemplateObj'} = $template;
$action->{'ScripObj'} = RT::Scrip->new($self->CurrentUser); # Stub. sendemail action really wants a scripobj available
$action->Prepare or return;
- $action->Commit;
-
+ return $action->Commit;
}
RT::Base->_ImportOverlays();
commit 0693d96e5726e772d6edb375f956097e258fb83d
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Ruleset.pm
diff --git a/lib/RT/Ruleset.pm b/lib/RT/Ruleset.pm
index d914f0a..1356585 100644
--- a/lib/RT/Ruleset.pm
+++ b/lib/RT/Ruleset.pm
@@ -71,6 +71,7 @@ sub CommitRules {
my ($class, $rules) = @_;
$_->Commit
for @$rules;
+ return;
}
sub Add {
@@ -78,7 +79,7 @@ sub Add {
for (@{$args{Rules}}) {
$_->require or die $UNIVERSAL::require::ERROR;
}
- push @RULE_SETS, $class->new(\%args);
+ return push @RULE_SETS, $class->new(\%args);
}
RT::Base->_ImportOverlays();
commit b1d29d010bb4b03f7ee7db275566945d7d9e6643
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/SavedSearch.pm
diff --git a/lib/RT/SavedSearch.pm b/lib/RT/SavedSearch.pm
index 1867e21..12fa34d 100644
--- a/lib/RT/SavedSearch.pm
+++ b/lib/RT/SavedSearch.pm
@@ -76,11 +76,12 @@ An object of this class is called "search"
=cut
-sub ObjectName { "search" }
+sub ObjectName { return "search" }
sub PostLoad {
my $self = shift;
$self->{'Type'} = $self->{'Attribute'}->SubValue('SearchType');
+ return;
}
sub SaveAttribute {
commit 52bff73055f9c50827437274d322df257b111a2d
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/SavedSearches.pm
diff --git a/lib/RT/SavedSearches.pm b/lib/RT/SavedSearches.pm
index 3e32ed1..14f82bd 100644
--- a/lib/RT/SavedSearches.pm
+++ b/lib/RT/SavedSearches.pm
@@ -113,6 +113,7 @@ sub LimitToPrivacy {
} else {
$RT::Logger->error("Could not load object $privacy");
}
+ return;
}
### Accessor methods
commit 1f546a5267effbc4303d7822718f161af39a73e3
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/ScripAction_Overlay.pm
diff --git a/lib/RT/ScripAction_Overlay.pm b/lib/RT/ScripAction_Overlay.pm
index 9ea6772..14d368a 100755
--- a/lib/RT/ScripAction_Overlay.pm
+++ b/lib/RT/ScripAction_Overlay.pm
@@ -172,14 +172,15 @@ sub LoadAction {
eval "require $type" || die "Require of $type failed.\n$@\n";
- $self->{'Action'} = $type->new ( Argument => $self->Argument,
- CurrentUser => $self->CurrentUser,
- ScripActionObj => $self,
- ScripObj => $args{'ScripObj'},
- TemplateObj => $self->TemplateObj,
- TicketObj => $args{'TicketObj'},
- TransactionObj => $args{'TransactionObj'},
- );
+ return $self->{'Action'} = $type->new(
+ Argument => $self->Argument,
+ CurrentUser => $self->CurrentUser,
+ ScripActionObj => $self,
+ ScripObj => $args{'ScripObj'},
+ TemplateObj => $self->TemplateObj,
+ TicketObj => $args{'TicketObj'},
+ TransactionObj => $args{'TransactionObj'},
+ );
}
# }}}
commit 59de14cca00123cae864653fa3f801933266cc39
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/ScripActions_Overlay.pm
diff --git a/lib/RT/ScripActions_Overlay.pm b/lib/RT/ScripActions_Overlay.pm
index 0d9a37e..566e69e 100755
--- a/lib/RT/ScripActions_Overlay.pm
+++ b/lib/RT/ScripActions_Overlay.pm
@@ -90,7 +90,8 @@ sub LimitToType {
FIELD => 'Type',
VALUE => "Correspond")
if $type eq "Create";
- $self->Limit (ENTRYAGGREGATOR => 'OR',
+ # XXX: 4.2 return;
+ return $self->Limit (ENTRYAGGREGATOR => 'OR',
FIELD => 'Type',
VALUE => 'any');
commit 21b1a76d6a6d6a4b33f6d94b38891e90e9c1eb1c
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/ScripCondition_Overlay.pm
diff --git a/lib/RT/ScripCondition_Overlay.pm b/lib/RT/ScripCondition_Overlay.pm
index ff22ad1..e5ee88f 100755
--- a/lib/RT/ScripCondition_Overlay.pm
+++ b/lib/RT/ScripCondition_Overlay.pm
@@ -175,14 +175,15 @@ sub LoadCondition {
eval "require $type" || die "Require of $type failed.\n$@\n";
- $self->{'Condition'} = $type->new ( 'ScripConditionObj' => $self,
- 'TicketObj' => $args{'TicketObj'},
- 'ScripObj' => $args{'ScripObj'},
- 'TransactionObj' => $args{'TransactionObj'},
- 'Argument' => $self->Argument,
- 'ApplicableTransTypes' => $self->ApplicableTransTypes,
- CurrentUser => $self->CurrentUser
- );
+ return $self->{'Condition'} = $type->new(
+ 'ScripConditionObj' => $self,
+ 'TicketObj' => $args{'TicketObj'},
+ 'ScripObj' => $args{'ScripObj'},
+ 'TransactionObj' => $args{'TransactionObj'},
+ 'Argument' => $self->Argument,
+ 'ApplicableTransTypes' => $self->ApplicableTransTypes,
+ CurrentUser => $self->CurrentUser
+ );
}
# }}}
commit f2b03490af0fe59fe5a15524b1a9d5e71d761a22
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/ScripConditions_Overlay.pm
diff --git a/lib/RT/ScripConditions_Overlay.pm b/lib/RT/ScripConditions_Overlay.pm
index b4f1fe1..8df303d 100755
--- a/lib/RT/ScripConditions_Overlay.pm
+++ b/lib/RT/ScripConditions_Overlay.pm
@@ -91,7 +91,8 @@ sub LimitToType {
FIELD => 'Type',
VALUE => "Correspond")
if $type eq "Create";
- $self->Limit (ENTRYAGGREGATOR => 'OR',
+ # XXX: 4.2 return;
+ return $self->Limit (ENTRYAGGREGATOR => 'OR',
FIELD => 'Type',
VALUE => 'any');
commit ccabdca1691661b20c0c7a6f28b3a09d7a7b275f
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Scrip_Overlay.pm
diff --git a/lib/RT/Scrip_Overlay.pm b/lib/RT/Scrip_Overlay.pm
index 3c89f84..80fada6 100755
--- a/lib/RT/Scrip_Overlay.pm
+++ b/lib/RT/Scrip_Overlay.pm
@@ -267,7 +267,8 @@ sub LoadModules {
my $self = shift;
$self->ConditionObj->LoadCondition;
- $self->ActionObj->LoadAction;
+ # XXX: 4.2 return 1;
+ return $self->ActionObj->LoadAction;
}
# {{{ sub TemplateObj
commit 10449f4db8850ecbc710188ce12a86cf855aec89
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Scrips_Overlay.pm
diff --git a/lib/RT/Scrips_Overlay.pm b/lib/RT/Scrips_Overlay.pm
index 34d0531..c1074ed 100644
--- a/lib/RT/Scrips_Overlay.pm
+++ b/lib/RT/Scrips_Overlay.pm
@@ -80,14 +80,18 @@ another call to this method
=cut
sub LimitToQueue {
- my $self = shift;
- my $queue = shift;
-
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Queue',
- VALUE => "$queue")
- if defined $queue;
-
+ my $self = shift;
+ my $queue = shift;
+
+ if (defined $queue) {
+ return $self->Limit(
+ ENTRYAGGREGATOR => 'OR',
+ FIELD => 'Queue',
+ VALUE => "$queue"
+ );
+ } else {
+ return;
+ }
}
# }}}
@@ -103,12 +107,13 @@ another call to this method or LimitToQueue
sub LimitToGlobal {
- my $self = shift;
-
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Queue',
- VALUE => 0);
-
+ my $self = shift;
+
+ return $self->Limit(
+ ENTRYAGGREGATOR => 'OR',
+ FIELD => 'Queue',
+ VALUE => 0
+ );
}
# }}}
@@ -172,7 +177,7 @@ sub Apply {
@_ );
$self->Prepare(%args);
- $self->Commit();
+ return $self->Commit();
}
@@ -196,6 +201,7 @@ sub Commit {
$scrip->Commit( TicketObj => $self->{'TicketObj'},
TransactionObj => $self->{'TransactionObj'} );
}
+ return;
}
@@ -307,6 +313,7 @@ sub _SetupSourceObjects {
$self->{'TransactionObj'}->Load( $args{'Transaction'} )
|| $RT::Logger->err( "$self couldn't load transaction $args{'Transaction'}");
}
+ return;
}
# }}}
@@ -380,6 +387,7 @@ sub _FindScrips {
." for txn #".$self->{TransactionObj}->Id
." on ticket #".$self->{TicketObj}->Id
);
+ return;
}
# }}}
commit 2a52d3d6d74ebf78409184aa464afef2eb4b5510
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/SearchBuilder.pm
diff --git a/lib/RT/SearchBuilder.pm b/lib/RT/SearchBuilder.pm
index 4bc9b9b..985fe52 100755
--- a/lib/RT/SearchBuilder.pm
+++ b/lib/RT/SearchBuilder.pm
@@ -106,7 +106,7 @@ sub LimitToEnabled {
my $self = shift;
$self->{'handled_disabled_column'} = 1;
- $self->Limit( FIELD => 'Disabled', VALUE => '0' );
+ return $self->Limit( FIELD => 'Disabled', VALUE => '0' );
}
=head2 LimitToDeleted
@@ -119,7 +119,7 @@ sub LimitToDeleted {
my $self = shift;
$self->{'handled_disabled_column'} = $self->{'find_disabled_rows'} = 1;
- $self->Limit( FIELD => 'Disabled', VALUE => '1' );
+ return $self->Limit( FIELD => 'Disabled', VALUE => '1' );
}
=head2 FindAllRows
@@ -129,7 +129,7 @@ Find all matching rows, regardless of whether they are disabled or not
=cut
sub FindAllRows {
- shift->{'find_disabled_rows'} = 1;
+ return shift->{'find_disabled_rows'} = 1;
}
=head2 LimitAttribute PARAMHASH
@@ -220,6 +220,7 @@ sub LimitAttribute {
OPERATOR => ($args{NEGATE} ? 'IS NOT' : 'IS'),
VALUE => 'NULL',
) if $args{NULL};
+ return;
}
=head2 LimitCustomField
@@ -271,7 +272,8 @@ sub LimitCustomField {
OPERATOR => '=',
VALUE => $self->_SingularClass,
);
- $self->Limit(
+ # XXX: 4.2 return;
+ return $self->Limit(
ALIAS => $alias,
FIELD => 'Content',
OPERATOR => $args{'OPERATOR'},
@@ -308,7 +310,7 @@ sub Limit {
if ($ARGS{FUNCTION}) {
($ARGS{ALIAS}, $ARGS{FIELD}) = split /\./, delete $ARGS{FUNCTION}, 2;
- $self->SUPER::Limit(%ARGS);
+ return $self->SUPER::Limit(%ARGS);
} elsif ($ARGS{FIELD} =~ /\W/
or $ARGS{OPERATOR} !~ /^(=|<|>|!=|<>|<=|>=
|(NOT\s*)?LIKE
@@ -317,14 +319,14 @@ sub Limit {
|IS(\s*NOT)?
|IN)$/ix) {
$RT::Logger->crit("Possible SQL injection attack: $ARGS{FIELD} $ARGS{OPERATOR}");
- $self->SUPER::Limit(
+ return $self->SUPER::Limit(
%ARGS,
FIELD => 'id',
OPERATOR => '<',
VALUE => '0',
);
} else {
- $self->SUPER::Limit(%ARGS);
+ return $self->SUPER::Limit(%ARGS);
}
}
commit e579ecff187bfa0c10f3d1bdccc0d7021ed2f85c
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/SharedSetting.pm
diff --git a/lib/RT/SharedSetting.pm b/lib/RT/SharedSetting.pm
index 6d1dbfe..2364676 100644
--- a/lib/RT/SharedSetting.pm
+++ b/lib/RT/SharedSetting.pm
@@ -358,10 +358,10 @@ sub IsVisibleTo {
return 0;
}
-sub CurrentUserCanSee { 1 }
-sub CurrentUserCanCreate { 1 }
-sub CurrentUserCanModify { 1 }
-sub CurrentUserCanDelete { 1 }
+sub CurrentUserCanSee { return 1 }
+sub CurrentUserCanCreate { return 1 }
+sub CurrentUserCanModify { return 1 }
+sub CurrentUserCanDelete { return 1 }
### Internal methods
commit f779371334c4c05fd924994455b7466d209b8fdf
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Shredder.pm
diff --git a/lib/RT/Shredder.pm b/lib/RT/Shredder.pm
index c3185e1..cd3ccd5 100644
--- a/lib/RT/Shredder.pm
+++ b/lib/RT/Shredder.pm
@@ -271,7 +271,7 @@ sub Init
{
%opt = @_;
RT::LoadConfig();
- RT::Init();
+ return RT::Init();
}
=head4 new
@@ -540,6 +540,7 @@ sub WipeoutAll
next if $v->{'State'} & (WIPED | IN_WIPING);
$self->Wipeout( Object => $v->{'Object'} );
}
+ return;
}
sub Wipeout
@@ -616,6 +617,7 @@ sub ValidateRelations
next if( $record->{'State'} & VALID );
$record->{'Object'}->ValidateRelations( Shredder => $self );
}
+ return;
}
=head3 Data storage and backups
@@ -767,6 +769,7 @@ sub DumpObject {
my ($state, $msg) = $_->Run( %args );
die "Couldn't run plugin: $msg" unless $state;
}
+ return;
}
{ my $mark = 1; # XXX: integer overflows?
@@ -785,6 +788,7 @@ sub PopDumpMark {
my ($state, $msg) = $_->PushMark( @_ );
die "Couldn't pop mark: $msg" unless $state;
}
+ return;
}
sub RollbackDumpTo {
my $self = shift;
@@ -792,6 +796,7 @@ sub RollbackDumpTo {
my ($state, $msg) = $_->RollbackTo( @_ );
die "Couldn't rollback to mark: $msg" unless $state;
}
+ return;
}
}
commit 8d8458331dbe6aaa88acdb4dbfd363cf48088389
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Shredder/POD.pm
diff --git a/lib/RT/Shredder/POD.pm b/lib/RT/Shredder/POD.pm
index 4e55c01..f7e2f2a 100644
--- a/lib/RT/Shredder/POD.pm
+++ b/lib/RT/Shredder/POD.pm
@@ -58,6 +58,7 @@ sub plugin_html
my $parser = RT::Shredder::POD::HTML->new;
$parser->select('ARGUMENTS', 'USAGE');
$parser->parse_from_file( $file, $out_fh );
+ return;
}
sub plugin_cli
@@ -69,6 +70,7 @@ sub plugin_cli
$parser->select('SYNOPSIS', 'ARGUMENTS', 'USAGE');
$parser->add_selection('NAME') unless $no_name;
$parser->parse_from_file( $file, $out_fh );
+ return;
}
sub shredder_cli
@@ -79,6 +81,7 @@ sub shredder_cli
my $parser = Pod::PlainText->new;
$parser->select('NAME', 'SYNOPSIS', 'USAGE', 'OPTIONS');
$parser->parse_from_file( $file, $out_fh );
+ return;
}
package RT::Shredder::POD::HTML;
@@ -98,6 +101,7 @@ sub command
print $out_fh $expansion;
print $out_fh "</$tag>" if $tag;
print $out_fh "\n";
+ return;
}
sub verbatim
@@ -108,6 +112,7 @@ sub verbatim
print $out_fh $paragraph;
print $out_fh "</pre>";
print $out_fh "\n";
+ return;
}
sub textblock {
@@ -119,6 +124,7 @@ sub textblock {
print $out_fh $expansion;
print $out_fh "</p>";
print $out_fh "\n";
+ return;
}
sub interior_sequence {
commit 39437cf15bf51ba0ebb7fbc46bfe1b0c3e243ed6
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/System.pm
diff --git a/lib/RT/System.pm b/lib/RT/System.pm
index c7041b9..a335a11 100755
--- a/lib/RT/System.pm
+++ b/lib/RT/System.pm
@@ -145,6 +145,7 @@ sub AddRights {
$RIGHTS = { %$RIGHTS, %new };
%RT::ACE::LOWERCASERIGHTNAMES = ( %RT::ACE::LOWERCASERIGHTNAMES,
map { lc($_) => $_ } keys %new);
+ return;
}
sub _Init {
commit 7909a4cec0bee2d2c885f2f12702b585a265bdcc
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Templates_Overlay.pm
diff --git a/lib/RT/Templates_Overlay.pm b/lib/RT/Templates_Overlay.pm
index 142eb43..f702d3c 100755
--- a/lib/RT/Templates_Overlay.pm
+++ b/lib/RT/Templates_Overlay.pm
@@ -98,10 +98,11 @@ aren't that queue's templates.
sub LimitToNotInQueue {
my $self = shift;
my $queue_id = shift;
- $self->Limit(FIELD => 'Queue',
- VALUE => "$queue_id",
- OPERATOR => '!='
- );
+ return $self->Limit(
+ FIELD => 'Queue',
+ VALUE => "$queue_id",
+ OPERATOR => '!='
+ );
}
# }}}
@@ -117,10 +118,11 @@ which can be used with any queue.
sub LimitToGlobal {
my $self = shift;
my $queue_id = shift;
- $self->Limit(FIELD => 'Queue',
- VALUE => "0",
- OPERATOR => '='
- );
+ return $self->Limit(
+ FIELD => 'Queue',
+ VALUE => "0",
+ OPERATOR => '='
+ );
}
# }}}
@@ -136,10 +138,11 @@ templates
sub LimitToQueue {
my $self = shift;
my $queue_id = shift;
- $self->Limit(FIELD => 'Queue',
- VALUE => "$queue_id",
- OPERATOR => '='
- );
+ return $self->Limit(
+ FIELD => 'Queue',
+ VALUE => "$queue_id",
+ OPERATOR => '='
+ );
}
# }}}
commit fb7f10f18d612dc2b8a3a261e3d5e54991a753fd
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Test.pm
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index c19b1d2..e984efd 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -179,6 +179,7 @@ sub import {
Test::More->export_to_level($level);
__PACKAGE__->export_to_level($level);
+ return;
}
sub is_empty {
@@ -194,7 +195,7 @@ my $created_new_db; # have we created new db? mainly for parallel testing
sub db_requires_no_dba {
my $self = shift;
my $db_type = RT->Config->Get('DatabaseType');
- return 1 if $db_type eq 'SQLite';
+ return $db_type eq 'SQLite';
}
sub bootstrap_tempdir {
@@ -285,6 +286,7 @@ Set( \$LogToFile, 'debug' );
Set( \$LogDir, q{$tmp{'directory'}} );
Set( \$LogToFileNamed, 'rt.debug.log' );
END
+ return;
}
sub set_config_wrapper {
@@ -319,6 +321,7 @@ sub set_config_wrapper {
}
return $old_sub->(@_);
};
+ return;
}
sub bootstrap_db {
@@ -375,6 +378,7 @@ sub bootstrap_db {
$RT::Handle->InsertData( $RT::EtcPath . "/initialdata" );
}
DBIx::SearchBuilder::Record::Cachable->FlushCache;
+ return;
}
sub bootstrap_plugins {
@@ -453,6 +457,7 @@ sub bootstrap_plugins {
$RT::Handle->Connect; # XXX: strange but mysql can loose connection
}
$dba_dbh->disconnect if $dba_dbh;
+ return;
}
sub _get_dbh {
@@ -631,6 +636,7 @@ sub restore_rights {
Test::More::diag "couldn't create a record: $msg";
}
}
+ return;
}
sub set_rights {
@@ -709,7 +715,7 @@ sub run_mailgate {
}
};
- $self->run_and_capture(%args);
+ return $self->run_and_capture(%args);
}
sub run_and_capture {
@@ -782,7 +788,7 @@ sub close_mailgate_ok {
my $class = shift;
my $mail = shift;
close $mail;
- Test::More::is ($? >> 8, 0, "The mail gateway exited normally. yay");
+ return Test::More::is ($? >> 8, 0, "The mail gateway exited normally. yay");
}
sub mailsent_ok {
@@ -796,7 +802,7 @@ sub mailsent_ok {
noexist => 1
);
- Test::More::is(
+ return Test::More::is(
$mailsent, $expected,
"The number of mail sent ($expected) matches. yay"
);
@@ -818,7 +824,7 @@ sub fetch_caught_mails {
}
sub clean_caught_mails {
- unlink $tmp{'mailbox'};
+ return unlink $tmp{'mailbox'};
}
=head2 get_relocatable_dir
@@ -1215,6 +1221,7 @@ sub stop_server {
foreach my $pid (@SERVERS) {
waitpid $pid, 0;
}
+ return;
}
sub file_content {
commit 496f1774944f6290a0d8c7123218d01d4095d51e
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:25 2011 -0400
Explicit returns for lib/RT/Test/Email.pm
diff --git a/lib/RT/Test/Email.pm b/lib/RT/Test/Email.pm
index 3905d82..2d3d811 100644
--- a/lib/RT/Test/Email.pm
+++ b/lib/RT/Test/Email.pm
@@ -109,7 +109,7 @@ sub mail_ok (&@) {
diag $te->as_string;
}
}
- RT::Test->clean_caught_mails;
+ return RT::Test->clean_caught_mails;
}
END {
commit 6ea2dab669a04865058a6a84509f138f15c4c95a
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for lib/RT/Ticket_Overlay.pm
diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index f9063fd..700a5c6 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -3221,6 +3221,7 @@ sub ApplyTransactionBatch {
$self->_ApplyTransactionBatch;
$self->{_TransactionBatch} = [];
+ return;
}
sub _ApplyTransactionBatch {
@@ -3245,7 +3246,7 @@ sub _ApplyTransactionBatch {
TransactionObj => $batch->[0],
Type => $types,
);
- RT::Ruleset->CommitRules($rules);
+ return RT::Ruleset->CommitRules($rules);
}
my $have_global_destruction;
@@ -3289,7 +3290,7 @@ sub DESTROY {
# {{{ sub _OverlayAccessible
sub _OverlayAccessible {
- {
+ return {
EffectiveId => { 'read' => 1, 'write' => 1, 'public' => 1 },
Queue => { 'read' => 1, 'write' => 1 },
Requestors => { 'read' => 1, 'write' => 1 },
@@ -3630,7 +3631,7 @@ RT::CustomField->Create() via the 'LookupType' hash key.
# }}}
sub CustomFieldLookupType {
- "RT::Queue-RT::Ticket";
+ return "RT::Queue-RT::Ticket";
}
=head2 ACLEquivalenceObjects
commit 05a19321b051f1b359702dc89eb3636eb7b26bfd
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for lib/RT/Tickets_Overlay.pm
diff --git a/lib/RT/Tickets_Overlay.pm b/lib/RT/Tickets_Overlay.pm
index ea65901..915fcd5 100755
--- a/lib/RT/Tickets_Overlay.pm
+++ b/lib/RT/Tickets_Overlay.pm
@@ -260,6 +260,7 @@ sub CleanSlate {
_sql_u_watchers_aliases
_sql_current_user_can_see_applied
);
+ return;
}
=head1 Limit Helper Routines
@@ -326,6 +327,7 @@ sub _IdLimit {
);
}
$sb->_CloseParen;
+ return;
}
=head2 _EnumLimit
@@ -362,7 +364,7 @@ sub _EnumLimit {
$o->Load($value);
$value = $o->Id;
}
- $sb->_SQLLimit(
+ return $sb->_SQLLimit(
FIELD => $field,
VALUE => $value,
OPERATOR => $op,
@@ -386,7 +388,7 @@ sub _IntLimit {
die "Invalid Operator $op for $field"
unless $op =~ /^(=|!=|>|<|>=|<=)$/;
- $sb->_SQLLimit(
+ return $sb->_SQLLimit(
FIELD => $field,
VALUE => $value,
OPERATOR => $op,
@@ -505,6 +507,7 @@ sub _LinkLimit {
QUOTEVALUE => 0,
);
}
+ return;
}
=head2 _DateLimit
@@ -568,6 +571,7 @@ sub _DateLimit {
@rest,
);
}
+ return;
}
=head2 _StringLimit
@@ -593,7 +597,7 @@ sub _StringLimit {
$value = 'NULL';
}
- $sb->_SQLLimit(
+ return $sb->_SQLLimit(
FIELD => $field,
OPERATOR => $op,
VALUE => $value,
@@ -684,6 +688,7 @@ sub _TransDateLimit {
}
$sb->_CloseParen;
+ return;
}
=head2 _TransLimit
@@ -755,6 +760,7 @@ sub _TransLimit {
);
}
+ my $ret;
#Search for the right field
if ( $field eq 'Content' and RT->Config->Get('DontSearchFileAttachments') ) {
$self->_OpenParen;
@@ -784,8 +790,7 @@ sub _TransLimit {
CASESENSITIVE => 0,
);
}
-
-
+ return;
}
=head2 _WatcherLimit
@@ -979,6 +984,7 @@ sub _WatcherLimit {
);
}
$self->_CloseParen;
+ return;
}
sub _RoleGroupsJoin {
@@ -1203,7 +1209,7 @@ sub _WatcherMembershipLimit {
);
$self->_CloseParen;
-
+ return;
}
=head2 _CustomFieldDecipher
@@ -1578,6 +1584,7 @@ sub _CustomFieldLimit {
QUOTEVALUE => 0,
);
}
+ return;
}
sub _HasAttributeLimit {
@@ -1611,6 +1618,7 @@ sub _HasAttributeLimit {
VALUE => 'NULL',
QUOTEVALUE => 0,
);
+ return;
}
@@ -1841,7 +1849,7 @@ sub FreezeLimits {
my $self = shift;
require Storable;
require MIME::Base64;
- MIME::Base64::base64_encode(
+ return MIME::Base64::base64_encode(
Storable::freeze( \@{$self}{ $self->_FreezeThawKeys } ) );
}
@@ -1873,7 +1881,7 @@ sub ThawLimits {
= eval { @{ Storable::thaw( MIME::Base64::base64_decode($in) ) }; };
$RT::Logger->error($@) if $@;
-
+ return;
}
# }}}
@@ -1911,7 +1919,7 @@ sub LimitQueue {
#TODO check for a valid queue here
- $self->Limit(
+ return $self->Limit(
FIELD => 'Queue',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -1945,7 +1953,7 @@ sub LimitStatus {
OPERATOR => '=',
@_
);
- $self->Limit(
+ return $self->Limit(
FIELD => 'Status',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -1975,7 +1983,7 @@ sub IgnoreType {
# Tickets_Overlay_SQL/FromSQL goes down the right branch
# $self->LimitType(VALUE => '__any');
- $self->{looking_at_type} = 1;
+ return $self->{looking_at_type} = 1;
}
# }}}
@@ -1999,7 +2007,7 @@ sub LimitType {
VALUE => undef,
@_
);
- $self->Limit(
+ return $self->Limit(
FIELD => 'Type',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2027,7 +2035,7 @@ VALUE is a string to search for in the subject of the ticket.
sub LimitSubject {
my $self = shift;
my %args = (@_);
- $self->Limit(
+ return $self->Limit(
FIELD => 'Subject',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2060,7 +2068,7 @@ sub LimitId {
@_
);
- $self->Limit(
+ return $self->Limit(
FIELD => 'id',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2084,7 +2092,7 @@ VALUE is a value to match the ticket\'s priority against
sub LimitPriority {
my $self = shift;
my %args = (@_);
- $self->Limit(
+ return $self->Limit(
FIELD => 'Priority',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2110,7 +2118,7 @@ VALUE is a value to match the ticket\'s initial priority against
sub LimitInitialPriority {
my $self = shift;
my %args = (@_);
- $self->Limit(
+ return $self->Limit(
FIELD => 'InitialPriority',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2135,7 +2143,7 @@ VALUE is a value to match the ticket\'s final priority against
sub LimitFinalPriority {
my $self = shift;
my %args = (@_);
- $self->Limit(
+ return $self->Limit(
FIELD => 'FinalPriority',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2160,7 +2168,7 @@ VALUE is a value to match the ticket's TimeWorked attribute
sub LimitTimeWorked {
my $self = shift;
my %args = (@_);
- $self->Limit(
+ return $self->Limit(
FIELD => 'TimeWorked',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2185,7 +2193,7 @@ VALUE is a value to match the ticket's TimeLeft attribute
sub LimitTimeLeft {
my $self = shift;
my %args = (@_);
- $self->Limit(
+ return $self->Limit(
FIELD => 'TimeLeft',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2214,7 +2222,7 @@ VALUE is a string to search for in the body of the ticket
sub LimitContent {
my $self = shift;
my %args = (@_);
- $self->Limit(
+ return $self->Limit(
FIELD => 'Content',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2239,7 +2247,7 @@ VALUE is a string to search for in the body of the ticket
sub LimitFilename {
my $self = shift;
my %args = (@_);
- $self->Limit(
+ return $self->Limit(
FIELD => 'Filename',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2263,7 +2271,7 @@ VALUE is a content type to search ticket attachments for
sub LimitContentType {
my $self = shift;
my %args = (@_);
- $self->Limit(
+ return $self->Limit(
FIELD => 'ContentType',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2300,7 +2308,7 @@ sub LimitOwner {
$owner->Load( $args{'VALUE'} );
# FIXME: check for a valid $owner
- $self->Limit(
+ return $self->Limit(
FIELD => 'Owner',
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2344,7 +2352,7 @@ sub LimitWatcher {
$watcher_type = "Watcher";
}
- $self->Limit(
+ return $self->Limit(
FIELD => $watcher_type,
VALUE => $args{'VALUE'},
OPERATOR => $args{'OPERATOR'},
@@ -2385,7 +2393,7 @@ sub LimitLinkedTo {
@_
);
- $self->Limit(
+ return $self->Limit(
FIELD => 'LinkedTo',
BASE => undef,
TARGET => $args{'TARGET'},
@@ -2430,7 +2438,7 @@ sub LimitLinkedFrom {
my $type = $args{'TYPE'};
$type = $fromToMap{$type} if exists( $fromToMap{$type} );
- $self->Limit(
+ return $self->Limit(
FIELD => 'LinkedTo',
TARGET => undef,
BASE => $args{'BASE'},
@@ -2568,7 +2576,7 @@ sub LimitDate {
. $args{'VALUE'} . " GMT";
}
- $self->Limit(%args);
+ return $self->Limit(%args);
}
@@ -2576,39 +2584,39 @@ sub LimitDate {
sub LimitCreated {
my $self = shift;
- $self->LimitDate( FIELD => 'Created', @_ );
+ return $self->LimitDate( FIELD => 'Created', @_ );
}
sub LimitDue {
my $self = shift;
- $self->LimitDate( FIELD => 'Due', @_ );
+ return $self->LimitDate( FIELD => 'Due', @_ );
}
sub LimitStarts {
my $self = shift;
- $self->LimitDate( FIELD => 'Starts', @_ );
+ return $self->LimitDate( FIELD => 'Starts', @_ );
}
sub LimitStarted {
my $self = shift;
- $self->LimitDate( FIELD => 'Started', @_ );
+ return $self->LimitDate( FIELD => 'Started', @_ );
}
sub LimitResolved {
my $self = shift;
- $self->LimitDate( FIELD => 'Resolved', @_ );
+ return $self->LimitDate( FIELD => 'Resolved', @_ );
}
sub LimitTold {
my $self = shift;
- $self->LimitDate( FIELD => 'Told', @_ );
+ return $self->LimitDate( FIELD => 'Told', @_ );
}
sub LimitLastUpdated {
my $self = shift;
- $self->LimitDate( FIELD => 'LastUpdated', @_ );
+ return $self->LimitDate( FIELD => 'LastUpdated', @_ );
}
#
@@ -2644,7 +2652,7 @@ sub LimitTransactionDate {
. $args{'VALUE'} . " GMT";
}
- $self->Limit(%args);
+ return $self->Limit(%args);
}
@@ -2733,6 +2741,7 @@ sub LimitCustomField {
);
$self->{'RecalcTicketLimits'} = 1;
+ return;
}
# }}}
@@ -3184,7 +3193,7 @@ to.
sub RestrictionValues {
my $self = shift;
my $field = shift;
- map $self->{'TicketRestrictions'}{$_}{'VALUE'}, grep {
+ return map $self->{'TicketRestrictions'}{$_}{'VALUE'}, grep {
$self->{'TicketRestrictions'}{$_}{'FIELD'} eq $field
&& $self->{'TicketRestrictions'}{$_}{'OPERATOR'} eq "="
}
@@ -3207,6 +3216,7 @@ sub ClearRestrictions {
$self->{'looking_at_effective_id'} = 0;
$self->{'looking_at_type'} = 0;
$self->{'RecalcTicketLimits'} = 1;
+ return;
}
# }}}
@@ -3228,6 +3238,7 @@ sub DeleteRestriction {
$self->{'RecalcTicketLimits'} = 1;
#make the underlying easysearch object forget all its preconceptions
+ return;
}
# }}}
@@ -3363,7 +3374,7 @@ sub _ProcessRestrictions {
}
$self->{'RecalcTicketLimits'} = 0;
-
+ return;
}
=head2 _BuildItemMap
@@ -3396,6 +3407,7 @@ sub _BuildItemMap {
}
$self->{'item_map'}{'last'} = $prev
if !$window || @$items < $window;
+ return;
}
=head2 ItemMap
@@ -3442,7 +3454,7 @@ sub PrepForSerialization {
my $self = shift;
delete $self->{'items'};
delete $self->{'items_array'};
- $self->RedoSearch();
+ return $self->RedoSearch();
}
=head1 FLAGS
commit 009ac346808142bb15bbe18052959ee26aa25d8b
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for lib/RT/Tickets_Overlay_SQL.pm
diff --git a/lib/RT/Tickets_Overlay_SQL.pm b/lib/RT/Tickets_Overlay_SQL.pm
index b6ef5e5..94ce9c1 100755
--- a/lib/RT/Tickets_Overlay_SQL.pm
+++ b/lib/RT/Tickets_Overlay_SQL.pm
@@ -72,6 +72,7 @@ sub _InitSQL {
$self->{'_sql_watcher_join_users_alias'} = undef;
$self->{'_sql_query'} = '';
$self->{'_sql_looking_at'} = {};
+ return;
}
sub _SQLLimit {
@@ -89,8 +90,8 @@ sub _SQLLimit {
# All SQL stuff goes into one SB subclause so we can deal with all
# the aggregation
- $self->SUPER::Limit(%args,
- SUBCLAUSE => 'ticketsql');
+ return $self->SUPER::Limit(%args,
+ SUBCLAUSE => 'ticketsql');
}
sub _SQLJoin {
@@ -98,16 +99,16 @@ sub _SQLJoin {
# the aggregation
my $this = shift;
- $this->SUPER::Join(@_,
+ return $this->SUPER::Join(@_,
SUBCLAUSE => 'ticketsql');
}
# Helpers
sub _OpenParen {
- $_[0]->SUPER::_OpenParen( 'ticketsql' );
+ return $_[0]->SUPER::_OpenParen( 'ticketsql' );
}
sub _CloseParen {
- $_[0]->SUPER::_CloseParen( 'ticketsql' );
+ return $_[0]->SUPER::_CloseParen( 'ticketsql' );
}
=head1 SQL Functions
@@ -166,6 +167,7 @@ sub _close_bundle {
}
$bundle[0]->{dispatch}->( $self, \@args );
}
+ return;
}
sub _parser {
@@ -238,6 +240,7 @@ sub _parser {
};
RT::SQL::Parse($string, \%callback);
$self->_close_bundle(@bundle); @bundle = ();
+ return;
}
=head2 ClausesToSQL
commit 898158b910cb1b52b453128269412c1ad27c8191
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for lib/RT/Transaction_Overlay.pm
diff --git a/lib/RT/Transaction_Overlay.pm b/lib/RT/Transaction_Overlay.pm
index ea6461d..13c1249 100755
--- a/lib/RT/Transaction_Overlay.pm
+++ b/lib/RT/Transaction_Overlay.pm
@@ -958,7 +958,7 @@ sub IsInbound {
# }}}
sub _OverlayAccessible {
- {
+ return {
ObjectType => { public => 1},
ObjectId => { public => 1},
@@ -1175,6 +1175,7 @@ sub UpdateCustomFields {
);
}
}
+ return;
}
@@ -1220,7 +1221,7 @@ be passed to RT::CustomField->Create() via the 'LookupType' hash key.
# }}}
sub CustomFieldLookupType {
- "RT::Queue-RT::Ticket-RT::Transaction";
+ return "RT::Queue-RT::Ticket-RT::Transaction";
}
@@ -1272,7 +1273,7 @@ sub DeferredRecipients {
# Transactions don't change. by adding this cache config directive, we don't lose pathalogically on long tickets.
sub _CacheConfig {
- {
+ return {
'cache_p' => 1,
'fast_update_p' => 1,
'cache_for_sec' => 6000,
commit c8b94cd3512f50c98473ff476a0956fbec2c9353
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for lib/RT/Transactions_Overlay.pm
diff --git a/lib/RT/Transactions_Overlay.pm b/lib/RT/Transactions_Overlay.pm
index 0b5be02..9f029cc 100755
--- a/lib/RT/Transactions_Overlay.pm
+++ b/lib/RT/Transactions_Overlay.pm
@@ -115,7 +115,7 @@ sub LimitToTicket {
VALUE => 'RT::Ticket',
);
}
- $self->Limit(
+ return $self->Limit(
ALIAS => $self->{tickets_table},
FIELD => 'EffectiveId',
OPERATOR => '=',
commit 13b9808a366842f91e39be8f2b17a1a577be236a
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for lib/RT/URI.pm
diff --git a/lib/RT/URI.pm b/lib/RT/URI.pm
index 06de429..9ba2b10 100755
--- a/lib/RT/URI.pm
+++ b/lib/RT/URI.pm
@@ -178,9 +178,9 @@ sub _GetResolver {
my $resolver = eval { $class->new($self->CurrentUser); };
if ($resolver) {
- $self->{'resolver'} = $resolver;
+ return $self->{'resolver'} = $resolver;
} else {
- $self->{'resolver'} = RT::URI::base->new($self->CurrentUser);
+ return $self->{'resolver'} = RT::URI::base->new($self->CurrentUser);
}
}
commit e058576331f8582b55602fa1673453372d0e38d4
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for lib/RT/URI/base.pm
diff --git a/lib/RT/URI/base.pm b/lib/RT/URI/base.pm
index 1534149..ab4920c 100755
--- a/lib/RT/URI/base.pm
+++ b/lib/RT/URI/base.pm
@@ -83,7 +83,7 @@ sub new {
sub ParseObject {
my $self = shift;
my $obj = shift;
- $self->{'uri'} = "unknown-object:".ref($obj);
+ return $self->{'uri'} = "unknown-object:".ref($obj);
}
sub ParseURI {
@@ -93,7 +93,7 @@ sub ParseURI {
if ($uri =~ /^(.*?):/) {
$self->{'scheme'} = $1;
}
- $self->{'uri'} = $uri;
+ return $self->{'uri'} = $uri;
}
commit c2a62e0bcf6b2c9012bdd455bfb1e77f17e98844
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for lib/RT/User_Overlay.pm
diff --git a/lib/RT/User_Overlay.pm b/lib/RT/User_Overlay.pm
index a169a81..d201ca0 100755
--- a/lib/RT/User_Overlay.pm
+++ b/lib/RT/User_Overlay.pm
@@ -77,7 +77,7 @@ use RT::Interface::Email;
use Encode;
sub _OverlayAccessible {
- {
+ return {
Name => { public => 1, admin => 1 },
Password => { read => 0 },
@@ -1805,7 +1805,7 @@ sub SetPrivateKey {
}
sub BasicColumns {
- (
+ return (
[ Name => 'User Id' ],
[ EmailAddress => 'Email' ],
[ RealName => 'Name' ],
commit 32790dd7c493c7cfc9e13dced790729dfa1cb761
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for lib/RT/Users_Overlay.pm
diff --git a/lib/RT/Users_Overlay.pm b/lib/RT/Users_Overlay.pm
index 61ad269..ddc5e99 100755
--- a/lib/RT/Users_Overlay.pm
+++ b/lib/RT/Users_Overlay.pm
@@ -124,7 +124,7 @@ sub LimitToEnabled {
my $self = shift;
$self->{'handled_disabled_column'} = 1;
- $self->Limit(
+ return $self->Limit(
ALIAS => $self->PrincipalsAlias,
FIELD => 'Disabled',
VALUE => '0',
@@ -141,7 +141,7 @@ sub LimitToDeleted {
my $self = shift;
$self->{'handled_disabled_column'} = $self->{'find_disabled_rows'} = 1;
- $self->Limit(
+ return $self->Limit(
ALIAS => $self->PrincipalsAlias,
FIELD => 'Disabled',
VALUE => 1,
@@ -161,7 +161,7 @@ that email address
sub LimitToEmail {
my $self = shift;
my $addr = shift;
- $self->Limit( FIELD => 'EmailAddress', VALUE => "$addr" );
+ return $self->Limit( FIELD => 'EmailAddress', VALUE => "$addr" );
}
# }}}
@@ -189,10 +189,10 @@ sub MemberOfGroup {
ALIAS2 => $groupalias,
FIELD2 => 'MemberId' );
- $self->Limit( ALIAS => "$groupalias",
- FIELD => 'GroupId',
- VALUE => "$group",
- OPERATOR => "=" );
+ return $self->Limit( ALIAS => "$groupalias",
+ FIELD => 'GroupId',
+ VALUE => "$group",
+ OPERATOR => "=" );
}
# }}}
@@ -213,7 +213,7 @@ sub LimitToPrivileged {
unless ( $priv->Id ) {
$RT::Logger->crit("Couldn't find a privileged users group");
}
- $self->MemberOfGroup( $priv->PrincipalId );
+ return $self->MemberOfGroup( $priv->PrincipalId );
}
# }}}
@@ -462,11 +462,11 @@ sub _JoinGroupMembersForGroupRights
my $self = shift;
my %args = (@_);
my $group_members = $self->_JoinGroupMembers( %args );
- $self->Limit( ALIAS => $args{'ACLAlias'},
- FIELD => 'PrincipalId',
- VALUE => "$group_members.GroupId",
- QUOTEVALUE => 0,
- );
+ return $self->Limit( ALIAS => $args{'ACLAlias'},
+ FIELD => 'PrincipalId',
+ VALUE => "$group_members.GroupId",
+ QUOTEVALUE => 0,
+ );
}
# XXX: should be generalized
@@ -553,6 +553,7 @@ sub WhoBelongToGroups {
ENTRYAGGREGATOR => 'OR',
);
}
+ return;
}
# }}}
commit baca239fa7cbf44d8b3dc6b53c99b1a4b3df60a4
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for sbin/extract-message-catalog
diff --git a/sbin/extract-message-catalog b/sbin/extract-message-catalog
index dafb6d1..b201b59 100755
--- a/sbin/extract-message-catalog
+++ b/sbin/extract-message-catalog
@@ -236,6 +236,7 @@ sub extract_strings_from_code {
push @{ $FILECAT->{$key} }, [ $filename, $line, '' ];
push @{ $FILECAT->{$val} }, [ $filename, $line, '' ];
}
+ return;
}
# }}} extract from strings
commit fb9f1a42b4fbc91d2f9c0f9e5a3f850b582c4be8
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for sbin/license_tag
diff --git a/sbin/license_tag b/sbin/license_tag
index 5720aa9..e3584e5 100755
--- a/sbin/license_tag
+++ b/sbin/license_tag
@@ -142,7 +142,7 @@ sub tag_mason {
open( $fh, '>', $pm ) or die "couldn't write new file";
print $fh $file;
close $fh;
-
+ return;
}
@@ -175,7 +175,7 @@ sub tag_makefile {
open( $fh, '>', $pm ) or die "couldn't write new file";
print $fh $file;
close $fh;
-
+ return;
}
@@ -209,7 +209,7 @@ sub tag_pm {
open( $fh, '>', $pm ) or die "couldn't write new file $pm";
print $fh $file;
close $fh;
-
+ return;
}
@@ -246,7 +246,7 @@ sub tag_script {
open( $fh, '>', $pm ) or die "couldn't write new file";
print $fh $file;
close $fh;
-
+ return;
}
sub another_license {
commit a1f259d83bab9a61973129557697dc44d8ac64c8
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for sbin/rt-email-dashboards.in
diff --git a/sbin/rt-email-dashboards.in b/sbin/rt-email-dashboards.in
index fccf339..db21ed4 100644
--- a/sbin/rt-email-dashboards.in
+++ b/sbin/rt-email-dashboards.in
@@ -112,10 +112,10 @@ if ($opts{'help'}) {
}
# helper functions
-sub verbose { print loc(@_), "\n" if $opts{debug} || $opts{verbose}; 1 }
-sub debug { print loc(@_), "\n" if $opts{debug}; 1 }
-sub error { $RT::Logger->error(loc(@_)); verbose(@_); 1 }
-sub warning { $RT::Logger->warning(loc(@_)); verbose(@_); 1 }
+sub verbose { print loc(@_), "\n" if $opts{debug} || $opts{verbose}; return 1 }
+sub debug { print loc(@_), "\n" if $opts{debug}; return 1 }
+sub error { $RT::Logger->error(loc(@_)); verbose(@_); return 1 }
+sub warning { $RT::Logger->warning(loc(@_)); verbose(@_); return 1 }
my $now = $opts{epoch} || time;
verbose "Using time [_1]", scalar localtime($now);
@@ -271,7 +271,7 @@ SUMMARY
RT->Config->Get('WebURL') . '/Dashboards/Render.html',
);
- email_dashboard($currentuser, $email, $dashboard, $subscription, $contents);
+ return email_dashboard($currentuser, $email, $dashboard, $subscription, $contents);
}
sub email_dashboard {
@@ -299,6 +299,7 @@ sub email_dashboard {
error 'Failed to email dashboard to user [_1] <[_2]>',
$currentuser->Name, $email;
+ return;
}
sub build_email {
@@ -363,7 +364,7 @@ sub build_email {
}
sub get_from {
- RT->Config->Get('DashboardAddress') || RT->Config->Get('OwnerEmail')
+ return RT->Config->Get('DashboardAddress') || RT->Config->Get('OwnerEmail')
}
{
@@ -492,9 +493,9 @@ sub get_resource {
}
package RT::Dashboard::FakeRequest;
-sub new { bless {}, shift }
-sub header_out { shift }
-sub headers_out { shift }
+sub new { return bless {}, shift }
+sub header_out { return shift }
+sub headers_out { return shift }
sub content_type {
my $self = shift;
$self->{content_type} = shift if @_;
commit f5ce79774c461898963e9a8619f8476714a7d932
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for sbin/rt-email-digest.in
diff --git a/sbin/rt-email-digest.in b/sbin/rt-email-digest.in
index 5b5cf27..5450f56 100644
--- a/sbin/rt-email-digest.in
+++ b/sbin/rt-email-digest.in
@@ -139,6 +139,7 @@ sub run {
print "Failed to send message to $user\n";
}
}
+ return;
}
exit 0;
@@ -213,6 +214,7 @@ sub mark_transactions_sent {
);
}
}
+ return;
}
sub since_date {
commit 6f00ff4fc74c75428c463382ee3a1ce5ceec787c
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for sbin/rt-email-group-admin.in
diff --git a/sbin/rt-email-group-admin.in b/sbin/rt-email-group-admin.in
index cd6f4a7..a95af97 100755
--- a/sbin/rt-email-group-admin.in
+++ b/sbin/rt-email-group-admin.in
@@ -187,6 +187,7 @@ sub usage {
my $parser = Pod::PlainText->new( sentence => 0, width => 78 );
$parser->parse_from_file( $0 );
}
+ return;
}
parse_args();
commit 1b9c3a0ab62dcc06e8a32be182ee173ac913ff37
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for sbin/rt-message-catalog
diff --git a/sbin/rt-message-catalog b/sbin/rt-message-catalog
index 5dcf9a1..92c2d7a 100755
--- a/sbin/rt-message-catalog
+++ b/sbin/rt-message-catalog
@@ -119,6 +119,7 @@ sub stats {
}
print "\n$legend\n";
+ return;
}
sub shrink {
@@ -171,6 +172,7 @@ sub shrink {
}
print "\n$legend\n";
+ return;
}
sub clean {
@@ -257,12 +259,12 @@ sub rosetta {
}
$ext->write_po($fn_orig);
}
- extract({});
+ return extract({});
}
sub extract {
shift;
- system($^X, 'sbin/extract-message-catalog', @_);
+ return system($^X, 'sbin/extract-message-catalog', @_);
}
sub usage {
commit 754e54f5e793f23ac80abd0e8a399b1d7c723bc0
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for sbin/rt-setup-database.in
diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index 32879ee..626443d 100755
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -416,7 +416,7 @@ sub _get_dbh {
sub _yesno {
print "Proceed [y/N]:";
my $x = scalar(<STDIN>);
- $x =~ /^y/i;
+ return $x =~ /^y/i;
}
sub help {
@@ -466,7 +466,7 @@ Several actions can be combined using comma separated list.
EOF
-
+ return;
}
1;
commit 500c3932d9d41a08ac00469f79e3fc080105b34e
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for sbin/rt-shredder.in
diff --git a/sbin/rt-shredder.in b/sbin/rt-shredder.in
index c835c7b..ba8d5cb 100755
--- a/sbin/rt-shredder.in
+++ b/sbin/rt-shredder.in
@@ -193,6 +193,7 @@ sub prompt_delete_objs
}
print $list;
exit(0) unless prompt_yN( "Do you want to proceed?" );
+ return;
}
sub prompt_yN
@@ -294,7 +295,7 @@ sub _process_search_plugin {
sub _process_dump_plugin {
my ($shredder, $plugin) = @_;
- $shredder->AddDumpPlugin(
+ return $shredder->AddDumpPlugin(
Object => $plugin,
);
}
commit f24ca5a4a44aff77b9c71a2993f159e6329fd6ba
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for sbin/rt-test-dependencies.in
diff --git a/sbin/rt-test-dependencies.in b/sbin/rt-test-dependencies.in
index 7825b5a..723ed7c 100755
--- a/sbin/rt-test-dependencies.in
+++ b/sbin/rt-test-dependencies.in
@@ -110,6 +110,7 @@ $args{$_} = $default{$_} foreach grep !exists $args{$_}, keys %default;
my $s = shift;
$section = $s;
print "$s:\n" unless $args{'list-deps'};
+ return;
}
sub print_found {
@@ -126,6 +127,7 @@ $args{$_} = $default{$_} foreach grep !exists $args{$_}, keys %default;
print "\t\t$extra\n" if defined $extra;
}
+ return;
}
}
@@ -191,6 +193,7 @@ required modules. It will be called with the module name, or, if
"RT_FIX_DEPS_CMD" contains a "%s", will replace the "%s" with the
module name before calling the program.
.
+ return;
}
@@ -442,6 +445,7 @@ sub test_dep {
if ( $args{'list-deps'} ) {
print $module, ': ', $version || 0, "\n";
+ return 1;
}
else {
eval "use $module $version ()";
@@ -583,6 +587,7 @@ sub check_perl_version {
} else {
print_found( sprintf(">=5.8.3(%vd)", $^V), 1 );
}
+ return 1;
}
sub check_users {
@@ -593,6 +598,7 @@ sub check_users {
print_found("libs group (@LIBS_GROUP@)", defined getgrnam("@LIBS_GROUP@"));
print_found("web owner (@WEB_USER@)", defined getpwnam("@WEB_USER@"));
print_found("web group (@WEB_GROUP@)", defined getgrnam("@WEB_GROUP@"));
+ return;
}
commit 94479bf647f518b1351252336f391bd748ef9817
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 21 16:41:26 2011 -0400
Explicit returns for sbin/rt-validator.in
diff --git a/sbin/rt-validator.in b/sbin/rt-validator.in
index 3158d40..7219708 100644
--- a/sbin/rt-validator.in
+++ b/sbin/rt-validator.in
@@ -123,6 +123,7 @@ Press enter to continue.
END
# Read a line of text, any line of text
<STDIN>;
+ return;
}
use RT;
@@ -948,6 +949,7 @@ sub check_integrity {
print STDERR "\t". describe( $stable, $sid ) ."\n";
$args{'action'}->( $sid, map { $scols[$_] => $set[$_] } (0 .. (@scols-1)) ) if $args{'action'};
}
+ return;
}
sub describe {
@@ -1010,6 +1012,7 @@ sub check_uniqueness {
print STDERR "\t$columns[$i] => '$set[$i]'\n";
}
}
+ return;
}
sub load_record {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list