View on
Chris Weyl > Fedora-Bugzilla > Fedora::Bugzilla



Annotate this POD



New  3
Open  0
View/Report Bugs
Module Version: 0.13   Source  


Fedora::Bugzilla - Interact with Fedora's bugzilla instance


    use Fedora::Bugzilla;


The XML-RPC interface to bugzilla is a quite useful, and while bugzilla 3.x is starting to flesh their interface out a bit more (see, e.g., WWW::Bugzilla3), Fedora's bugzilla implementation has a large number of custom methods. This module aims to expose them, in a kinder, gentler way.

In addition to the XML-RPC methods Bugzilla makes available, there are also some things we only seem to be able to access via the web/XML interfaces. (See, e.g., the flags, attachments and comments functionality.) This package works to expose those as well.

Some functionality is more expensive to invoke than others, for a variety of reasons. We strive to only access each bit as we need it, to minimize time and effort while still making available as much as is possible.

(And, yes, I know it's really RedHat's bugzilla. Some day... oh yes, some day...)


"Release Early, Release Often"

I've tried to get at least the methods I use in here. I know I'm missing some, and I bet there are others I don't even know about... I'll try not to, but I won't guarantee that I won't change the api in some incompatable way. If you'd like to see something here, please either drop me a line (see AUTHOR) or better yet, open a ticket with a patch ;)

Note also, the documentation is woefully incomplete.



Standard constructor. Takes a number of arguments, two of which are required; note that each of these arguments is also available through an accessor of the same name once the object instance has been created.

userid => Str

Required. Your bugzilla userid (generally your email address).

passwd => Str

Required. Your bugzilla password.

site => Str|URI

The URI of the interface you're trying to access. Note this (correctly) defaults to

cookie_file => Str|Path::Class::File

Takes a filename to give to the RPC's useragent instance as file to hold the bugzilla cookies in. Set to undef to use no actual file, and just cache cookies in-memory.

Defaults to: "$ENV{HOME}/";


Log in to the bugzilla service.


True if we're logged in, false otherwise.


Log out from the bugzilla service.



Creates a new bug, passing @_ to the constructor of the default new bug class. See Fedora::Bugzilla::NewBug.


Gets/sets the class used to create new bugs with.


bug, get_bug (Int|Str)

Given a bug id/alias, returns a corresponding Fedora::Bugzilla::Bug.

bugs, get_bugs (Int|Str, ...)

Given a list of bug id/aliases, return a Fedora::Bugzilla::Bugs object.


These functions return a Fedora::Bugzilla::Bugs object representing the results of the query.


Given the name of a saved search, run it and return the bugs.


Alias to run_savedsearch().

run_quicksearch(Str, ...)

Given a number of search terms, submit to Bugzilla for a quicksearch (akin to entering terms on the web UI).



FIXME. Returns an array of products the user can search or enter bugs against.


Returns the version of the bugzilla server.


Returns the timezone the bugzilla server is in.

offer_account_by_email (email address)

Sends an offer of a Bugzilla account to the given email address.


We've tried to take steps to make sure things are speedy: "non-changing" values are cached and only pulled when needed, etc. While we don't implement a multicall queued approach (yet), we do try to minimize the number of queries required; e.g. by using Bug.get_bugs when multiple bugs are needed.

Some of the functionality requires that the XML representation of the bug be pulled (e.g. flags, comments, attachment listings, etc); in these cases we don't do the actual pull until requested.

For methods that return more than one bug wrapped in a Fedora::Bugzilla::Bugs object, we fetch all the bug data through one XMLRPC call once someone tries to access any of the bug data in it (e.g. bugs(), num_bugs(), etc). Additionally, if aggressive_fetch is set in the parent Fedora::Bugzilla object, we'll pull down the XML and any other data we need for each bug. Pulling all the data at one time can result in significant time savings over having each bug object pull their own.


Note that performing an action on a bug that changes any value will result in all data (save the id) being discarded, and reloaded the next time the bug is accessed. It's best to pull any information you may need _before_ updating the bug, if the situation warrants it, to avoid the second call to the Bugzilla server.


At the moment, we generally die() or confess() any errors.


Source, tickets, etc can be all accessed through the Camelus project at Please use the 'Fedora-Bugzilla' component when reporting issues or making feature requests:


There are still many areas of functionality we do not handle yet. If you'd like to see something in here, specific or otherwise, please make a feature request through the trac ticketing interface.

SEE ALSO ^,,, the WWW::Bugzilla3 module.


Chris Weyl <>


Copyright (c) 2008, Chris Weyl <>

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 OR 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
syntax highlighting: