[Rt-commit] r18761 - rt/3.8/trunk/bin
falcone at bestpractical.com
falcone at bestpractical.com
Tue Mar 10 15:47:20 EDT 2009
Author: falcone
Date: Tue Mar 10 15:47:19 2009
New Revision: 18761
Modified:
rt/3.8/trunk/bin/rt.in
Log:
* return 0 in a bunch of places so we exit with 0 rather than
having warnings when we exit(undef)
Modified: rt/3.8/trunk/bin/rt.in
==============================================================================
--- rt/3.8/trunk/bin/rt.in (original)
+++ rt/3.8/trunk/bin/rt.in Tue Mar 10 15:47:19 2009
@@ -190,12 +190,12 @@
sub version {
print "rt $VERSION\n";
- return;
+ return 0;
}
sub logout {
submit("$REST/logout") if defined $session->cookie;
- return;
+ return 0;
}
sub quit {
@@ -206,6 +206,7 @@
my %help;
sub help {
my ($action, $type, $rv) = @_;
+ $rv = defined $rv ? $rv : 0;
my $key;
# What help topics do we know about?
@@ -357,7 +358,7 @@
my $forms = Form::parse($r->content);
prettylist ($forms);
}
- return;
+ return 0;
}
# Displays selected information about a single object.
@@ -450,7 +451,7 @@
my $forms = Form::parse($c);
prettyshow ($forms);
}
- return;
+ return 0;
}
# To create a new object, we ask the server for a form with the defaults
@@ -643,7 +644,7 @@
if ($output) {
print $text;
- return;
+ return 0;
}
my $synerr = 0;
@@ -669,12 +670,12 @@
}
else {
print $r->content;
- return;
+ return 0;
}
}
print $r->content;
}
- return;
+ return 0;
}
# handler for special edit commands. A valid edit command is constructed and
@@ -747,7 +748,7 @@
if (/-a/) {
unless (-f $ARGV[0] && -r $ARGV[0]) {
whine "Cannot read attachment: '$ARGV[0]'.";
- return;
+ return 0;
}
push @files, shift @ARGV;
}
@@ -817,7 +818,7 @@
goto NEXT;
}
elsif (!@$o) {
- return;
+ return 0;
}
@files = @{ vsplit($k->{Attachment}) };
@@ -835,7 +836,7 @@
my $r = submit("$REST/ticket/$id/comment", \%data);
print $r->content;
- return;
+ return 0;
}
# Merge one ticket into another.
@@ -867,7 +868,7 @@
my $r = submit("$REST/ticket/$id[0]/merge/$id[1]");
print $r->content;
- return;
+ return 0;
}
# Link one ticket to another.
@@ -918,7 +919,7 @@
my $r = submit("$REST/$type/link", \%data);
print $r->content;
- return;
+ return 0;
}
# Take/steal a ticket
@@ -957,7 +958,7 @@
my $r = submit("$REST/ticket/$id/take", \%data);
print $r->content;
- return;
+ return 0;
}
# Grant/revoke a user's rights.
@@ -970,7 +971,7 @@
}
$revoke = 1 if $cmd->{action} eq 'revoke';
- return;
+ return 0;
}
# Client <-> Server communication.
@@ -1452,7 +1453,7 @@
my $sub = (caller(1))[3];
$sub =~ s/^main:://;
warn "rt: $sub: @_\n";
- return;
+ return 0;
}
sub read_passwd {
@@ -1618,7 +1619,7 @@
$spec =~ s|^(?:$type/)?|$type/| if defined $type;
return $spec if ($spec =~ m{^$name/(?:$idlist|$labels)(?:/.*)?$}o);
- return;
+ return 0;
}
sub suggest_help {
More information about the Rt-commit
mailing list