Data::...tchList(3pm)
๐ NAME ๐
okay so Data::Password::zxcvbn::MatchList โ it's literally just a collection of matches for a password. that's the whole vibe. bestie, it lives in the Perl docs (User Contributed Perl Documentation), and yes the manpage title got chopped to Data::...tchList(3pm) because apparently Unix manpage headers have no chill. ๐
โจ VERSION โจ
version 1.1.3 โ she's official, she's shipped. ๐
๐ธ SYNOPSIS ๐ธ
here's the whole serve in two lines, no cap:
use Data::Password::zxcvbn::MatchList;
my $list = Data::Password::zxcvbn::MatchList->omnimatch($password)
->most_guessable_match_list;
see how it chains? omnimatch then most_guessable_match_list. chef's kiss. ๐
๐ฆ DESCRIPTION ๐ฆ
so zxcvbn estimates how strong a password is by guessing which way a generic password cracker would produce it, and then guessing after how many tries it would produce it. that's the whole strategy, and honestly? kind of iconic. ๐ฅ
This class represents a list of guesses ("matches"), covering different substrings of a password.
๐ ATTRIBUTES ๐
password
Required string, the password this list is about. it's the main character of the whole object, fr fr. ๐
matches
Arrayref, the actual list of matches. the receipts, basically. ๐งพ
guesses
The estimated number of attempts that a generic password cracker would need to guess the whole password. ngl this one's a little shy โ it will be set for objects returned by "most_guessable_match_list", not for those returned by "omnimatch". so don't come for her when she's undefined, she warned you. ๐ญ
๐ METHODS ๐
omnimatch
my $match_list = Data::Password::zxcvbn::MatchList->omnimatch($password,\%opts);
Main constructor (the name comes from the original JS implementation โ yes bestie, we inherited the naming, we don't make the rules). It calls ->make($password,\%opts) on all the Data::Password::zxcvbn::Match::* classes (or the ones in @{$opts{modules}} if you're feeling custom ๐
), combines all the matches, and returns a MatchList holding them. one big happy match family. ๐ซถ
most_guessable_match_list
my $minimal_list = $match_list->most_guessable_match_list;
This method extracts, from the matches of the invocant, a list of non-overlapping matches with minimum guesses. That list should represent the way that a generic password cracker would guess the password, and as such is the one that the main function will use. she's the chosen one. โจ
guesses_log10
The logarithm in base 10 of "guesses". math girlies rise. ๐งฎ๐
score
my $score = $match_list->score;
Returns an integer from 0-4 (useful for implementing a strength bar โ yes, that strength bar, the one you see on every signup page ever). See "Data::Password::zxcvbn::TimeEstimate::guesses_to_score" for the details. โญ
get_feedback
my %feedback = %{ $match_list->get_feedback };
my %feedback = %{ $match_list->get_feedback($max_score_for_feedback) };
the feedback system, and honestly she's got range:
- If there's no matches, returns the result of
"feedback_for_no_matches". - If the match list
scoreis above $max_score_for_feedback (default2โ lowkey important, don't forget the default), returns the result of"feedback_above_threshold". - Otherwise, collects all the feedback from the
matches, and returns it, merged with the result of"feedback_below_threshold"(suggestions are appended, but the warning from the matches takes precendence โ spelling's not mine, that's the original, iykyk ๐).
feedback_for_no_matches
Returns a feedback for when the password didn't match any of our heuristics. It contains no warning, and some simple common suggestions. like, "hey bestie, maybe try a little harder?" but nicer. ๐
feedback_above_threshold
Returns a feedback for when the password scored above the threshold passed to "get_feedback" (i.e. the password is "good"). It's an empty feedback. nothing to say, you ate. ๐
feedback_below_threshold
Returns a feedback for when the password scored below the threshold passed to "get_feedback" (i.e. the password is "bad"). It suggests to add some words. constructive criticism energy only, we don't do mean here. ๐
๐ AUTHOR ๐
Gianni Ceccarelli <gianni.ceccarelli@broadbean.com>
๐ COPYRIGHT AND LICENSE ๐
This software is copyright (c) 2022 by BroadBean UK, a CareerBuilder Company.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
okay that's the whole page bestie, go forth and match some passwords ๐โจ
<nice sign-off> this guide was served to you by perl v5.40.1, dated 2025-10-17, page Data::...tchList(3pm) โ mwah, take care of her ๐
๐
๐ฆ where this page comes from
- ubuntu resolute: libdata-password-zxcvbn-perl 1.1.3-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdata-password-zxcvbn-perl 1.1.3-1 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms