-#!perl -n
+#!/usr/bin/perl -n
use 5.010; use strict; use warnings;
our %count;
our $mobile;
if (m{<td class=hl>} .. m{</?td>}) {
- $count{-url} = 'http://stats.wikimedia.org/archive/squid_reports/';
- $count{-source} = 'Wikimedia';
+ $count{-source} = 'http://stats.wikimedia.org/archive/squid_reports/';
+ $count{-title } = 'Wikimedia';
$count{-date} = $1 if m{ period: (?:\d+ )?(\w+ \d+) };
next;
}
$version //= 0;
given ($browser) {
when (['Firefox', 'Iceweasel']) {
- $browser = 'gecko';
+ $browser = 'firefox';
continue;
}
when ('MSIE') {
- $browser = 'trident';
+ $browser = 'ie';
continue;
}
when ('Opera') {
- $browser = $mobile ? 'op_mob' : 'presto';
+ $browser = $mobile ? 'op_mob' : 'opera';
for ($version) {
if (m{\(Mini(.*)\)$}) {
$browser = 'op_mini';
continue;
}
when ('Safari') {
- $browser = $mobile ? 'ios_saf' : 'webkit_saf';
+ $browser = $mobile ? 'ios_saf' : 'safari';
my $numversion = join('.', map { sprintf '%03d', $_ } split /\./, $version);
$numversion =~ s/6(?=\d{3})//; # incomparable 6532.22 → 523
for (
}
}
when ('Chrome') {
- $browser = 'webkit_chr';
+ $browser = 'chrome';
s/\.\d+$// for $version;
}
when ('Android') {