use ;
my $r = HTTP::UA::Parser->new();
print $r->ua->toString(); # -> "Safari 5.0.1"
print $r->ua->toVersionString(); # -> "5.0.1"
print $r->ua->family; # -> "Safari"
print $r->ua->major; # -> "5"
print $r->ua->minor; # -> "0"
print $r->ua->patch; # -> "1"
print $r->os->toString(); # -> "iOS 5.1"
print $r->os->toVersionString(); # -> "5.1"
print $r->os->family # -> "iOS"
print $r->os->major; # -> "5"
print $r->os->minor; # -> "1"
print $r->os->patch; # -> undef
print $r->device->family; # -> "iPhone"
print $r->device->brand; # -> "Apple"
print $r->device->model; # -> "iPhone"
#####################################################
/usr/local/share/perl5/HTTP/UA/Parser/regexes.yaml
阅读(958) | 评论(0) | 转发(0) |