BZ::Cl...mponent(3pm)
π¦ BZ::Cl...mponent(3pm) β like, the whole Client Side representation of Product Components in Bugzilla situation
okay so this is a page from the User Contributed Perl Documentation section of the manual (yes the man name gets truncated to BZ::Cl...mponent(3pm), that's just how man renders it, don't panic π
).
β¨ NAME β¨
BZ::Client::Component β Client side representation of Product Components in Bugzilla.
π VERSION π
version 4.91
πΈ SYNOPSIS πΈ
This class provides methods for accessing Product Component information in the Bugzilla server. That's it, that's the vibe π
my $client = BZ::Client->new( url => $url,
user => $user,
password => $password );
my $id = BZ::Client::Component->create( $client, \%params );
my $changes = BZ::Client::Component->update( $client, \%params );
my $ids = BZ::Client::Component->delete( $client, \%params );
π CLASS METHODS π
This section lists the class methods, which are available in this module. Buckle up bestie, there's three of them π«Ά
β create
$id = BZ::Client::Component->create( $client, \%params );
Returns the ID of the newly created Component. literally that's the whole personality.
π History
- Added in Bugzilla
5.0. - Marked experiemental as of Bugzilla
5.0. (their spelling, not mine π β it means experimental, so like, proceed with main character energy but maybe don't bet your whole prod on it)
π Parameters
Some params must be set, or an error will be thrown. These params are marked "Required". No cap.
nameβ name (string) The name of the new component.
Required.
productβ product (string) The name of the product that the component must be added to. This product must already exist, and the user have the necessary permissions to edit components for it.
Required.
descriptionβ description (string) The description of the new component.
Required.
default_assigneeβ default_assignee (string) The login name of the default assignee of the component.
Required.
default_ccβ default_cc (array) An array of strings with each element representing one login name of the default CC list.default_qa_contactβ default_qa_contact (string) The login name of the default QA contact for the component.is_openβ is_open (boolean)1if you want to enable the component for bug creations.0otherwise. Default is1.
π Returns
The ID of the newly-added component β¨
π Errors
304- Authorization Failure β You are not authorized to create a new component.1200- Component already exists β The name that you specified for the new component already exists in the specified product.
π§ update
$changes = BZ::Client::Component->update( $client, \%params );
@changes = BZ::Client::Component->update( $client, \%params );
This allows you to update one or more components in Bugzilla. glow-up time π₯
π History
- Added in Bugzilla
5.0.
π Parameters
You must set one or both of ids or names to select the Component to update.
Other parameters set or update values of the Component:
idsβ ids (array) Numeric ID's of the components that you wish to update.namesβ names (array of hashes) Names of the components that you wish to update. The hash keys areproductandcomponent, representing the name of the product and the component you wish to change.nameβ name (string) A new name for this component. If you try to set this while updating more than one component for a product, an error will occur, as component names must be unique per product.descriptionβ description (string) The description of the new component.
Required.
default_assigneeβ default_assignee (string) The login name of the default assignee of the component.
Required.
default_ccβ default_cc (array) An array of strings with each element representing one login name of the default CC list.default_qa_contactβ default_qa_contact (string) The login name of the default QA contact for the component.is_openβ is_open (boolean)1if you want to enable the component for bug creations.0otherwise.
π Returns
An array of hashes with the following fields:
idβ id (int) The ID of the component that was updated.changesβ The changes that were actually done on this component. The keys are the names of the fields that were changed, and the values are a hash with two keys:addedβ added (string) The value that this field was changed to.removedβ removed (string) The value that was previously set in this field.
Note that booleans will be represented with the strings 1 and 0.
Here's an example of what a return value might look like:
[
{
id => 123,
changes => {
name => {
removed => 'FooName',
added => 'BarName'
},
default_assignee => {
removed => 'foo@company.com',
added => 'bar@company.com',
}
}
}
]
π Errors
51- User does not exist β One of the contact e-mail addresses is not a valid Bugzilla user.106- Product access denied β The product you are trying to modify does not exist or you don't have access to it.706- Product admin denied β You do not have the permission to change components for this product.105- Component name too long β The name specified for this component was longer than the maximum allowed length.1200- Component name already exists β You specified the name of a component that already exists. (Component names must be unique per product in Bugzilla.)1210- Component blank name β You must specify a non-blank name for this component.1211- Component must have description β You must specify a description for this component.1212- Component name is not unique β You have attempted to set more than one component in the same product with the same name. Component names must be unique in each product.1213- Component needs a default assignee β A default assignee is required for this component.
π delete
$ids = BZ::Client::Component->delete( $client, \%params );
@ids = BZ::Client::Component->delete( $client, \%params );
This allows you to delete one or more components in Bugzilla. bye bestie π
π History
- Added in Bugzilla
5.0.
π Parameters
You must set one or both of these parameters.
idsβ ids (array) Numeric ID's of the components that you wish to delete.namesβ names (array of hashes). Names of the components that you wish to delete. The hash keys areproductandcomponent, representing the name of the product and the component you wish to delete.
π Returns
An array of ID's that were deleted β¨
π Errors
106- Product access denied β The product you are trying to modify does not exist or you don't have access to it.706- Product admin denied β You do not have the permission to delete components for this product.1202- Component has bugs β The component you are trying to delete currently has bugs assigned to it. You must move these bugs before trying to delete the component.
ok this one's a whole thing β if the component still has bugs assigned, Bugzilla flat out refuses. move the bugs first, then come back π
π«Ά EXCEPTION HANDLING π«Ά
See BZ::Client::Exception. That's the whole section, she's brief and iconic.
π SEE ALSO π
BZ::ClientBZ::Client::API- Bugzilla API <https://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Component.html>
π AUTHORS π
- Dean Hamstead
<dean@bytefoundry.com.au> - Jochen Wiedmann
<jochen.wiedmann@gmail.com>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2026 by Dean Hamstad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page bestie, ily, go create some components β¨ β this rendered page came to you courtesy of perl v5.40.2, dated 2026-07-16, under the title BZ::Cl...mponent(3pm). mwah π
π¦ where this page comes from
- epel 10: perl-BZ-Client 4.9100-2.el10_3 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms