summaryrefslogtreecommitdiff
path: root/lib/WWW/Efa.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-08-13 17:28:54 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-08-13 17:28:54 +0200
commit5f87f2bb33116ae072b7320fe9cedace0050d5d1 (patch)
tree25a7e968508dad309df6d51831c9d12ae7545abf /lib/WWW/Efa.pm
parentc7f28c4a85c8f98c90761274050680b185d0f99a (diff)
Add $efa->setup_error() to replace $efa->{'error'} check
Diffstat (limited to 'lib/WWW/Efa.pm')
-rw-r--r--lib/WWW/Efa.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/WWW/Efa.pm b/lib/WWW/Efa.pm
index fc3ae37..58d55bd 100644
--- a/lib/WWW/Efa.pm
+++ b/lib/WWW/Efa.pm
@@ -407,6 +407,23 @@ sub new {
return bless($ref, $obj);
}
+=head2 $efa->setup_error()
+
+In case WWW::Efa->new() encountered an error (usually invalid options), this
+returns a B<WWW::Efa::Error::Setup> object describing the exact error.
+Otherwise, returns nothing.
+
+=cut
+
+sub setup_error {
+ my ($self) = @_;
+
+ if ($self->{'error'}) {
+ return $self->{'error'};
+ }
+ return;
+}
+
=head2 $efa->submit(%opts)
Submit the query to B<http://efa.vrr.de>.