Skip to content

Instantly share code, notes, and snippets.

@Tekki
Tekki / speedtest.pl
Created Nov 18, 2018
Perl 5 Speedtest
View speedtest.pl
#!/usr/bin/env perl
use v5.10;
package Point;
sub new {
my ($class, %args) = @_;
bless \%args, $class;
}
@Tekki
Tekki / speedtest.p6
Created Nov 18, 2018
Perl 6 Speedtest
View speedtest.p6
#!/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;
}
@Tekki
Tekki / mojo-vue.pl
Last active Apr 26, 2021
Mojolicious - Vue.js Example
View mojo-vue.pl
#!/usr/bin/env perl
use Mojolicious::Lite -signatures;
get '/' => sub ($c) {
$c->render(template => 'index');
};
get '/api/:region' => sub ($c) {
my %regions = (