WWW::Bugzilla(3pm)
β¨ NAME β¨
okay so bestie, meet WWW::Bugzilla π¦ β she handles submission/update of bugzilla bugs via WWW::Mechanize. That's the whole vibe. She's your perl bestie who files bugs for you so you don't have to click through forms like it's 2009. π
πΈ SYNOPSIS πΈ
use WWW::Bugzilla;
# create new bug
my $bz = WWW::Bugzilla->new( server => 'www.mybugzilla.com',
email => 'buguser@bug.com',
password => 'mypassword' );
# enter info into some fields and save new bug
# get list of available version choices
my @versions = $bz->available('version');
# set version
$bz->version( $versions[0] );
# get list of available products
my @products = $bz->available('product');
# set product
$bz->product( $products[0] );
# get list of components available
my @components = $bz->available('component');
# set component
$bz->component( $components[0] );
# optionally do the same for platform, os, priority, severity.
$bz->assigned_to( 'joeschmoe@whatever.com' );
$bz->summary( $some_text );
$bz->description( $some_more_text );
# submit bug, returning new bug number
my $bug_number = $bz->commit;
# all of the above could have been done in a much easier
# way, had we known what values to use. See below:
my $bz = WWW::Bugzilla->new( server => 'www.mybugzilla.com',
email => 'buguser@bug.com',
password => 'mypassword'
version => 'Alpha',
product => 'MyProduct',
component => 'API',
assigned_to => 'joeschmoe@whatever.com',
summary => $some_text,
description => $some_more_text);
my $bug_number = $bz->commit;
# Below is an example of how one would update a bug.
my $bz = WWW::Bugzilla->new( server => 'www.mybugzilla.com',
email => 'buguser@bug.com',
password => 'mypassword'
bug_number => 46 );
# show me the chosen component
my $component = $bz->component;
# change component
$bz->component( 'Test Failures' );
$bz->add_cc( 'me@me.org' );
$bz->add_attachment( filepath => '/home/me/file.txt',
description => 'description text',
is_patch => 0,
comment => 'comment text here' );
$bz->additional_comments( "comments here");
# below are examples of changing bug status
$bz->change_status("assigned");
$bz->change_status("fixed");
$bz->change_status("later");
$bz->mark_as_duplicate("12");
$bz->reassign("someone@else.com");
$bz->commit;
like, look at her go πββοΈπ¨ two whole ways to file a bug and a whole little glow-up routine for updating one. obsessed.
π DESCRIPTION π
Right now, WWW::Bugzilla gives you an API for posting brand-new Bugzilla bugs, and also for updating the Bugzilla bugs that already exist. That's it, that's the gig. β¨
π₯ INTERFACE π₯
π METHODS π
new()
Sets up your WWW::Bugzilla object, bestie. If you pass in bug_number, she'll set herself up as an existing bug instead of a fresh one.
Heads up: she willcroak()unless the Bugzilla login page on the server you named comes back with a200or a404. No 200, no 404, no vibes. π
new() supports these name-value params:
server(required) β the URL of the bugzilla server you wanna talk to. Do not puthttp://orhttps://in front of the url (peep theuse_ssloption below for that whole situation). πemail(required) β your email address as bugzilla knows it. i.e. your bugzilla login. π«Άpassword(required) β your Bugzilla password. keep it secret, keep it safe. π€«use_ssl(optional) β if you set it, she'll use thehttps://protocol instead; defaults tohttp://.
NOTE: this option needs Crypt::SSLeay. no module, no ssl, no cap. π
productβ the Bugzilla product name. required if you're entering a new bug (not updating one).bug_number(optional) β if your whole plan is to update an existing bug (not create a new one), drop a valid bug number right here. πversion component status assigned_to resolution dup_id assigned_to summary bug_number description os platform severity priority cc url add_cc target_milestone status_whiteboard keywords depends_on blocks additional_commentsβ these are the fields you can initialize straight innew(), which is super handy for new bugs. pls note: some of these fields only apply to bugs that are being updated, and if you set them here they'll get overridden if the value is already set in the actual bug on the server. These fields also each have their own get/set methods (scroll down, bestie π).
product() version() component() status() assigned_to() resolution() dup_id() assigned_to() summary() bug_number() description() os() platform() severity() priority() cc() url() add_cc() target_milestone() status_whiteboard() keywords() depends_on() blocks() additional_comments()
get/set the value of these bug fields. some of them apply only to new bugs, some only to bugs being updated. and commit() must be called to actually save these permanently β setting them is just the talking stage, fr fr. π
available()
Returns a list of the available options for the field you asked about. Here are the known valid fields:
product platform os version priority severity component target_milestone
so many choices, so little time. π
product()
Sets the Product for the bug. simple, iconic.
reassign()
Marks the bug you're updating as reassigned to another user. Takes an email address as its parameter. Status/resolution will not be updated until commit() is called. π
mark_as_duplicate()
Marks the bug you're updating as a duplicate of another bug number. Takes a bug number as its argument. Status/resolution will not be updated until commit() is called. twins fr. π―
change_status()
Changes the status of the bug you're updating. Status/resolution will not be updated until commit() is called. These are the valid options (case-insensitive, bestie):
assigned fixed invalid wontfix later remind worksforme reopen verified closed
pick your fighter. π₯
add_attachment()
Adds an attachment to an existing bug β will not work for new bugs. Here are the params you've got:
filepath(required)description(required)is_patch(optional boolean)content_typeβ autodetected if you don't define it.comment(optional)finishedβ will not return object to update form if set (optional boolean)
list_attachments()
Lists the attachments that are attached to an existing bug β will not work for new bugs.
get_attachment()
Gets the specified attachment from an existing bug β will not work for new bugs.
obsolete_attachment()
Marks the specified attachment obsolete β will not work for new bugs. not me being obsolete π
commit()
Submits the bugzilla new-or-update form. Returns bug_number. Optionally takes the parameter finished β if you set it, you're done updating the bug and she won't return you to the update page. (the original spells this out a lil goofy, but the meaning is: finished = no more round trips. π)
check_error ()
Checks if an error was given, croaking if it was. she's not gonna let it slide. π
get_products ()
Gets a list of products. π
get_comments()
Lists comments made on an existing bug β will not work for new bugs.
π¦ BUGS, IMPROVEMENTS π¦
ngl, there may well be bugs in this module. π Using it the way the author has, they just have not run into any. Also, this module does not support ALL of Bugzilla's features β it's giving "greatest hits," not "complete discography."
Any patches or improvements will be considered! Just send an email to the address listed below. bestie energy only, pls. π«Ά
π AUTHOR π
Maintained by:
- Brian Caswell,
bmc@shmoo.com
Originally written by:
- Matthew C. Vella,
the_mcv@yahoo.com
πΈ LICENSE πΈ
WWW::Bugzilla - Module providing API to create or update Bugzilla bugs.
Copyright (C) 2003 Matthew C. Vella (the_mcv@yahoo.com)
Portions Copyright (C) 2006 Brian Caswell (bmc@shmoo.com)
This module is free software; you can redistribute it and/or modify it
under the terms of either:
a) the GNU General Public License as published by the Free Software
Foundation; either version 1, or (at your option) any later version,
or
b) the "Artistic License" which comes with this module.
This program 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 either
the GNU General Public License or the Artistic License for more details.
You should have received a copy of the Artistic License with this
module, in the file ARTISTIC. If not, I'll be glad to provide one.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
and that's the whole page, bestie!! π this was perl v5.32.0, dated 2021-01-07, straight out of the WWW::Bugzilla(3pm) manual β mwah, go file some bugs, you absolute icon πβ¨π
π¦ where this page comes from
- debian bookworm: libwww-bugzilla-perl 1.5-2.1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- debian trixie: libwww-bugzilla-perl 1.5-2.1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu jammy: libwww-bugzilla-perl 1.5-2.1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu noble: libwww-bugzilla-perl 1.5-2.1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu resolute: libwww-bugzilla-perl 1.5-2.1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu stonking: libwww-bugzilla-perl 1.5-2.1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms