Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions lib/GRNOC/WebService/Method.pm
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ Callbacks are passed a reference to the method object and a reference to an inpu
When an error occurs, the callback should use the Method->set_error() method to document the
error condition and then return undefined.

If conditions occur in which setting an error is too much, but an issue needs to be reported to the user,
the callback should use the Method->set_warning() method to document the warning condition. However, as long
as an error does not appear, the callback should still return results (if any)

The second argument to a callback is reference to the untainted parameter hash, if the input parameter
is named "number" then $params->{'number'}{'value'} will provide the value for that parameter.

Expand Down Expand Up @@ -472,44 +468,6 @@ sub help {
return \%help;
}

=head2 get_warning()
gets the warnings encountered or undef.
=cut

sub get_warning {
my $self = shift;
return $self->{'warning'};
}


=head2 set_warning

taking a warning string as an argument, this goes
and either sets the warning if it's undefined,
or

=cut

sub set_warning {
my $self = shift;
my $warning = shift;

return if !$warning;

if (!$self->{'warning'}) {
$self->{'warning'} = [];
}

if (ref($warning) eq 'ARRAY') {
push(@{$self->{'warning'}}, @$warning);
}
else {
push (@{$self->{'warning'}}, $warning);
}

return join('\n', @{$self->{'warning'}});
}

=head2 get_error()

gets the last error encountered or undef.
Expand Down