The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Password::zxcvbn::AuthorTools::BuildRankedDictionaries - class to generate Data::Password::zxcvbn::*::RankedDictionaries

VERSION

version 1.0.2

SYNOPSIS

In your distribution's maint/build-ranked-dictionaries:

    #!/usr/bin/env perl
    use strict;
    use warnings;
    use Data::Password::zxcvbn::AuthorTools::BuildRankedDictionaries;

    Data::Password::zxcvbn::AuthorTools::BuildRankedDictionaries->new({
        dictionaries_word_count => {
            mything_wikipedia => 30000,
            mything_names     => 10000,
        },
        package_name => 'Data::Password::zxcvbn::RankedDictionaries::MyThing',
        package_abstract => 'adjacency graphs for my language',
        package_description => <<'EOF',
    This is a data file used by L<<
    C<Data::Password::zxcvbn::Match::Dictionary> >>, and is generated by
    the L<< C<build-ranked-dictionaries>|...>> program when
    building the distribution.
    EOF
    })->generate;

(a skeleton of such a file is generated when running dzil new -P zxcvbn Data::Password::zxcvbn::MyThing)

ATTRIBUTES

dictionaries_word_count

A hashref mapping dictionary names to number of words to use (a 0 value means "include all words"). The code in the "synopsis" would look for files data/mything_wikipedia.txt and data/mything_names.txt.

data_dir

Where to look for data files, defaults to data/.

output_dir

Where to write the generated package. Defaults to $ARGV[1] or lib/; this supports running the main/build-ranked-dictionaries script manually and via the dist.ini file.

package_name

Name of the package to generate, required. Should start with Data::Password::zxcvbn::RankedDictionaries::

package_version

Version of the package. Defaults to $ARGV[0] or undef; this supports running the main/build-ranked-dictionaries script manually and via the dist.ini file.

package_abstract

Abstract of the package, defaults to "ranked dictionaries for common words".

package_description

Description of the package, required.

METHODS

generate

Writes out the package.

AUTHOR

Gianni Ceccarelli <gianni.ceccarelli@broadbean.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2023 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.