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
| #!/bin/bash | |
| set -e | |
| function class() { | |
| current_class="$1" | |
| } | |
| declare -A _inheritance | |
| function extends() { | |
| _inheritance[$current_class]="$*" |
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 v5.26; | |
| use strict; | |
| use warnings; | |
| package My::Thing { | |
| use Moo; | |
| has value => ( is => 'ro', required => 1 ); | |
| }; |
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
| use v6.d; | |
| use NativeCall; | |
| class winsize is repr('CStruct') { | |
| has uint16 $.rows; | |
| has uint16 $.cols; | |
| has uint16 $.xpixels; | |
| has uint16 $.ypixels; | |
| method gist() { |
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
| use v6.d; | |
| use experimental :macros; | |
| role mmm { | |
| method ACCEPTS(Code:D: |c) { | |
| dd self;dd c; # debugging! | |
| return False unless c ~~ self.signature; | |
| self.(|c); | |
| return True; | |
| } |
OlderNewer