This file contains 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 Mojolicious::Lite -signatures; | |
get '/' => sub ($c) { | |
$c->render(template => 'index'); | |
}; | |
get '/api/:region' => sub ($c) { | |
my %regions = ( |
This file contains 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 perl6 | |
class Point { | |
has $.x; | |
has $.y; | |
} | |
my $total = 0; | |
for ^100_000_000 { | |
my $p = Point.new(x => 2, y => 3); | |
$total = $total + $p.x + $p.y; | |
} |
This file contains 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 v5.10; | |
package Point; | |
sub new { | |
my ($class, %args) = @_; | |
bless \%args, $class; | |
} |