Magrathea-API
view release on metacpan or search on metacpan
lib/Magrathea/API/Emergency.pm view on Meta::CPAN
=head3 update
This will take the current data and send it to Magrathea. The possible
valid responses are C<Information Valid> (0 in numeric context) or
C<Parsed OK. Check later for status.> (1 in numeric context).
If Magrathea's validation fails, the update will croak.
=cut
sub update
{
my $self = shift;
my $info = $self->info;
unless ($self->postcode and $self->name) {
croak "Name and postcode are mandatory";
}
my $response = $self->VALIDATE;
croak "Update failed: $response" if $response >= 2;
return $response;
}
( run in 0.227 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )