You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accepts a user agent string to parse, leave empty to parse caller user agent.
parse()
Accepts a new user agent to parse
ua()
Parses browser part of the user agent
os()
Parsers operating system part of the user agent
device()
Parses device part of the user agent
Stringify Methods
Methods to print results as strings
toString()
returns os / ua name
toVersionString()
returns full version number of os/browser
family()
returns family name of os/browser/device
major()
returns version's major part of os/browser
minor()
returns version's minor part of os/browser
patch()
returns versions patch part of os/browser
patchMinor()
returns version patch minor part of os/browser
brand()
returns brand name of device
model()
returns model name of device
INSTALLATION
From CPAN shell simply type
% perl -MCPAN -e 'install HTTP::UA::Parser'
Or from your local download, unpack and:
% perl Makefile.PL
% make && make test
Then install:
% make install
COMMAND LINE
To update regexes.yaml file from command line
% ua_parser -u
To parse some user agent from command line
% ua_parser -p "some user agent"
Help usage
% ua_parser -h
AUTHOR
Mamod A. Mehyar, <mamod.mehyar@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2020 by Mamod A. Mehyar & other contributors
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.