X-Git-Url: https://git.eyrie.org/?a=blobdiff_plain;f=tests%2Fdata%2Fpasswords%2Fmake-c-data;fp=tests%2Fdata%2Fpasswords%2Fmake-c-data;h=1fd2c548946cb78fd4d7455467a70bba3f11e956;hb=399c639c92b4c5f125ba09f47400f8ae39061a3c;hp=d525c0a998b47647277c2bbcb539bc67cf8d0524;hpb=743bbb08453a40326e0a2f737562d66a07cbaf66;p=kerberos%2Fkrb5-strength.git diff --git a/tests/data/passwords/make-c-data b/tests/data/passwords/make-c-data index d525c0a..1fd2c54 100755 --- a/tests/data/passwords/make-c-data +++ b/tests/data/passwords/make-c-data @@ -14,18 +14,18 @@ use strict; use warnings; use Carp qw(croak); +use Const::Fast qw(const); use Encode qw(encode); use File::Basename qw(basename); -use JSON; +use JSON::MaybeXS qw(JSON); use Perl6::Slurp qw(slurp); -use Readonly; ############################################################################## # Global variables ############################################################################## # The header on the generated source file. -Readonly my $HEADER => <<'END_HEADER'; +const my $HEADER => <<'END_HEADER'; /* * Automatically generated -- do not edit! * @@ -46,16 +46,16 @@ Readonly my $HEADER => <<'END_HEADER'; END_HEADER # The list of attributes, in order, whose values go into the C struct. -Readonly my @ATTRIBUTES => qw( - name principal password code error skip_for_system_cracklib +const my @ATTRIBUTES => qw( + name principal password code error skip_for_system_cracklib ); # A hash of attributes that should be put in the C struct as they literally # appear in the JSON, rather than as strings. (In other words, attributes # that are numbers, booleans, or C constants.) Only the keys are of interest. -Readonly my %IS_LITERAL_ATTRIBUTE => ( - code => 1, - skip_for_system_cracklib => 1 +const my %IS_LITERAL_ATTRIBUTE => ( + code => 1, + skip_for_system_cracklib => 1, ); ############################################################################## @@ -206,7 +206,7 @@ Russ Allbery =head1 COPYRIGHT AND LICENSE -Copyright 2020 Russ Allbery +Copyright 2020, 2023 Russ Allbery Copyright 2013 The Board of Trustees of the Leland Stanford Junior University