Debbugs::Bugs(3pm)

✨ Debbugs::Bugs β€” the bug-picking bestie of debbugs ✨

okay so real talk, this is Debbugs::Bugs, a Perl module from the User Contributed Perl Documentation, and it's literally the glow-up replacement for every messy way you used to select bugs. it lives in the 3pm man section bestie, and it's giving main character energy for bug selection. πŸ’…


🌸 NAME 🌸

Debbugs::Bugs β€” bug selection routines for debbugs πŸ›βœ¨


πŸŽ€ SYNOPSIS πŸŽ€

use Debbugs::Bugs qw(get_bugs);

like, that's it. that's the whole vibe. 🫢


πŸ’– DESCRIPTION πŸ’–

so basically this module is the ✨replacement✨ for ALL of the various methods of selecting different types of bugs. yes, all of them. she ate and left no crumbs. πŸ’…

she implements a single function, get_bugs, which defines the master interface for selecting bugs. one function to rule them all, periodt. πŸ‘‘

and the way she works is iconic β€” she attempts to use subsidiary functions to actually do the selection, in the order specified in the configuration files. πŸ”₯

ngl bestie, unless you're literally insane, they should be in order from fastest (and often most incomplete) to slowest (and most complete). that's just the vibe check okay. 😭

πŸ’€ BUGS πŸ’€

(no content here in the original, bestie β€” she's just sitting there, silently, like a mood. πŸ™ˆ)


πŸ‘‘ FUNCTIONS πŸ‘‘

πŸ¦‹ get_bugs

get_bugs()

✨ Parameters ✨

okay so listen β€” the following parameters can either be a single scalar OR a reference to an array. the parameters are ANDed together (all of them gotta match, no cap), and the elements of arrayrefs in a parameter are ORed (any of them matching is enough, slay). future versions of this may allow for limited regular expressions, and/or more complex expressions β€” so like, watch this space bestie. πŸ‘€

  • package β€” name of the binary package πŸ“¦
  • src β€” name of the source package πŸ“‚
  • maint β€” address of the maintainer πŸ“§
  • submitter β€” address of the submitter πŸ™‹
  • severity β€” severity of the bug 🚨
  • status β€” status of the bug πŸ“Š
  • tag β€” bug tags 🏷️
  • owner β€” owner of the bug πŸ‘€
  • correspondent β€” address of someone who sent mail to the log βœ‰οΈ
  • affects β€” bugs which affect this package 🎯
  • dist β€” distribution (ngl I don't know about this one yet 😭)
  • bugs β€” list of bugs to search within πŸ›
  • function β€” see description below πŸ‘‡

🌈 Special options 🌈

these are the special options used to modulate how the searches are performed β€” the little seasoning on top, iykyk. πŸ§‚βœ¨

  • archive β€” whether to search archived bugs or normal bugs; defaults to false. and as a special case bestie, if archive is 'both', then both archived and unarchived bugs are returned. iconic behaviour honestly. πŸ’…
  • usertags β€” set of usertags and the bugs they are applied to 🏷️

🧚 Subsidiary routines 🧚

all subsidiary routines get passed exactly the same set of options as get_bugs. and if for some reason they are unable to handle the options passed (like, for example, they don't have the right type of index for the type of selection) they should die as early as possible. dramatic? yes. necessary? also yes. πŸ’€

using Params::Validate and/or die when files don't exist makes this fairly trivial, so like, no excuses bestie. ✨

this function will then immediately move on to the next subroutine, giving it the same arguments. she's efficient like that. πŸƒβ€β™€οΈπŸ’¨

⭐ function ⭐

this option allows you to provide an arbitrary function which will be given the information in the index.db file. and bestie, I gotta be honest with you β€” this will be super, super slow, so only do this if there's literally no other way to write the search. like, last resort energy fr fr. 😭

you'll be given a list (which you can turn into a hash) like the following:

(pkg => ['a','b'], # may be a scalar (most common)
 bug => 1234,
 status => 'pending',
 submitter => 'boo@baz.com',
 severity => 'serious',
 tags => ['a','b','c'], # may be an empty arrayref
)

and the function should return 1 if the bug should be included; 0 if the bug should not. simple as that, no notes. βœ…


πŸ’œ count_bugs

count_bugs(function => sub {...})

uses a subroutine to classify bugs into categories and return the number of bugs which fall into those categories. counting era πŸ”’βœ¨


πŸ“ newest_bug

my $bug = newest_bug();

returns the bug number of the newest bug, which is nextnumber-1. fresh off the press, the newest baby bug 🐣


🧁 bug_filter

bug_filter

allows filtering bugs on commonly used criteria. she's picky and that's valid πŸ’…


πŸ’« get_bugs_by_idx

this routine uses the by-$index.idx indicies to try to speed up searches. yes she's trying to be fast, let her cook πŸ”₯


🌸 get_bugs_flatfile

this is the fallback search routine. it should be able to complete all searches. [or at least, that's the idea.] 🫠


πŸ”’ PRIVATE FUNCTIONS πŸ”’

🌟 __handle_pkg_src_and_maint

my @packages = __handle_pkg_src_and_maint(map {exists $param{$_}?($_,$param{$_}):()}
                                          qw(package src maint)
                                         );

turn package/src/maint into a list of packages. boom, transformed. βœ¨πŸ¦‹


and that's the whole page bestie!! this was perl v5.40.1, dated 2026-04-27, from the Debbugs::Bugs(3pm) manual in the User Contributed Perl Documentation. go forth and select your bugs responsibly, ily, mwah πŸ’–πŸŽ€βœ¨πŸ‘‘

πŸ“¦ where this page comes from