This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -MJSON::PP -E 'foreach ("001".."031") {$c = `curl -s "https://perlweeklychallenge.org/chart/pwc-challenge-$_.json"`; $d = decode_json $c; say scalar @{$d->{series}->[0]->{data}}; }' | perl -nalE 'push @d, $_ }{ say sprintf "https://quickchart.io/chart?width=500&height=300&c={type:\"bar\",data:{labels:[%s],datasets:[{label:\"Perl Weekly Challenge users by week\",data:[%s]}]}}", join(",", 1..scalar(@d)), join(",", @d)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Test::Most; | |
use Veure::Script; # strict, warnings, postderef, sigs, and more | |
use re 'eval'; # needed for (??{}) in the regex | |
# the (??{}) construct will execute code and consider the result of that | |
# to be a regex to match on. | |
my $yyyy_mm_dd = qr/ | |
^ | |
# any four digit year |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use 5.024; | |
package SVG::TrafficLight; | |
use Moose; | |
use SVG; |