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; | |
} |
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
;;; experiment with COBOL copybooks in Emacs | |
;; On a line with a COPY command, call `cobol/show-copybook' or | |
;; `cobol/hide-copybook'. | |
;; | |
;; To show or hide all copybooks in the buffer, use | |
;; `cobol/show-all-copybooks' and `cobol/hide-all-copybooks'. | |
;; | |
;; If the copybooks are located in a different folder, set variable | |
;; `cobol/copybook-directory'. |