script/dump-locations.pl untested

filter: Statementstmt 0.0% 0 / 22 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 5 Podpod n/a totaltotal 0.0% 0 / 30 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/local/bin/perl
2 package main;
3 use strict;
4 use Weather::MOSMIX;
5 use JSON 'encode_json';
6 use Weather::MOSMIX;
7 use Getopt::Long;
8  
9 our $VERSION = '0.04';
10  
11 GetOptions(
12 'dsn=s' => \my $dsn,
13 );
14  
15 $dsn ||= 'dbi:SQLite:dbname=mosmix-forecast.sqlite';
16 my $w = Weather::MOSMIX->new(
17 dbh => {
18 dsn => $dsn
19 },
20 );
21  
22 my $f = $w->locations();
23 binmode STDOUT, ':encoding(UTF-8)';
24 print encode_json($f);