HTTP::UserAgentClientHints::BrandVersion - To Handle Sec-CH-UA values of User Agent Client Hints
use HTTP::UserAgentClientHints; my $sec_ch_ua = q|" Not A;Brand";v="09", "Chromium";v="98", "Google Chrome";v="97.1"|; my $brand_version = HTTP::UserAgentClientHints::BrandVersion->new($sec_ch_ua);
HTTP::UserAgentClientHints::BrandVersion is the module which gives you a utility to handle Sec-CH-UA values of User Agent Client Hints (UA-CH)
The constructor. The $sec_ch_ua string is required.
To get brands list as array ref.
my $brands = $brand_version->brands;
NOTE that the order of the list is not specific. Please sort if you want.
To get a hash of brand and version pair.
$brand_version->brand_version->{Chromium}; # 98
Dai Okabayashi <bayashi@cpan.org>
HTTP::UserAgentClientHints::BrandVersion is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. (Note that, unlike the Artistic License 1.0, version 2.0 is GPL compatible by itself, hence there is no benefit to having an Artistic 2.0 / GPL disjunction.) See the file LICENSE for details.
HTTP::UserAgentClientHints::BrandVersion
To install HTTP::UserAgentClientHints, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::UserAgentClientHints
CPAN shell
perl -MCPAN -e shell install HTTP::UserAgentClientHints
For more information on module installation, please visit the detailed CPAN module installation guide.