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 score is above $max_score_for_feedback (default 2 โ€” 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>

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