Fedora-Bugzilla
view release on metacpan or search on metacpan
lib/Fedora/Bugzilla/XMLRPC.pm view on Meta::CPAN
# let's try it...
my $ret;
eval { $ret = super };
### $EVAL_ERROR
return $ret unless $EVAL_ERROR;
# check to see if it's a 'Login Required' fault
# if it is, we've already handled the login in the fault handler
do { return super }
if $EVAL_ERROR =~ /^RETRY/;
return $ret;
};
__PACKAGE__->meta->make_immutable(inline_constructor => 0);
1;
__END__
=head1 NAME
Fedora::Bugzilla::XMLRPC - Subclass RPC::XML::Client to catch login faults
=head1 SYNOPSIS
use <Module::Name>;
# Brief but working code example(s) here showing the most common usage(s)
# This section will be as far as many users bother reading
# so make it as educational and exemplary as possible.
=head1 DESCRIPTION
A subclass of L<RPC::XML::Client>, overriding a number send_request() and
fault_handler() to handle logins when they need to happen.
=head1 SUBROUTINES/METHODS
=over
=item B<fault_handler>
=item B<send_request>
=back
=head1 DIAGNOSTICS
See L<RPC::XML::Client>. We catch 'Login Required' faults, but everything
else remains the same.
=head1 SEE ALSO
L<RPC::XML::Client>.
=head1 BUGS AND LIMITATIONS
See L<Fedora::Bugzilla>.
Patches are welcome.
=head1 AUTHOR
Chris Weyl <cweyl@alumni.drew.edu>
=head1 LICENSE AND COPYRIGHT
Copyright (c) 2009 Chris Weyl <cweyl@alumni.drew.edu>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA
=cut
( run in 0.611 second using v1.01-cache-2.11-cpan-99c4e6809bf )