Crypt::Perl::X509::Extension::nameConstraints
my $usage_obj = Crypt::Perl::X509::Extension::nameConstraints->new( permitted => [ [ dNSName => 'haha.tld', 1, 4 ], #min, max ], excluded => [ [ dNSName => 'fofo.tld', 7 ], [ rfc822Name => 'haha@fofo.tld' ], ], );
https://tools.ietf.org/html/rfc5280#section-4.2.1.2
To install Crypt::Perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::Perl
CPAN shell
perl -MCPAN -e shell install Crypt::Perl
For more information on module installation, please visit the detailed CPAN module installation guide.