2013-11-23T15:20:34 biancaDas Modul zieht bei mir seit einigen Minuten einen riesengroßen Rattenschwanz von anderen Modulen hinter sich her.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/usr/bin/perl use strict; use warnings; use diagnostics; use HTTP::BrowserDetect 1.63; use 5.010; my %ua = ( Opera_1216 => 'Opera/9.80 (Windows NT 6.1; WOW64) Presto/2.12.388 Version/12.16', Firefox_24 => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0', IE_10 => 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Win64; x64; Trident/6.0)', Opera_18 => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.8 Safari/537.36 OPR/18.0.1284.5 (Edition Developer)', IE_11 => 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko', Firefox_25 => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0', muell => 'Negativtest', ); for my $k (sort {lc $a cmp lc $b} keys %ua) { my $browser = HTTP::BrowserDetect->new($ua{$k}) or die; say "$k: ",(defined $browser->browser_string() && defined $browser->version() ? $browser->browser_string().' '.$browser->version() : 'unbekannt'); }
1
2
3
4
5
6
7
Firefox_24: Firefox 24
Firefox_25: Firefox 25
IE_10: MSIE 10
IE_11: MSIE 11
muell: unbekannt
Opera_1216: Opera 12.16
Opera_18: Chrome 31