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
package Foo; | |
use parent 'signatures'; | |
sub import { | |
my $class = shift; | |
my $caller = shift; | |
$class->setup_for($caller); | |
return; |
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
package Foo; | |
use strict; | |
use warnings; | |
use parent 'signatures'; | |
require Method::Signatures; | |
sub proto_unwrap { | |
my $class = shift; | |
return Method::Signatures->parse_sub( proto => $_[0] ); |
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
#include <unistd.h> | |
#include <stdlib.h> | |
/* | |
* Meant to mimic the shell command | |
* exec perl -Mperl5i "$@" | |
* | |
* This is a C program so it works in a #! line. | |
*/ |
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
qr{ | |
\b | |
( | |
# scheme or schemeless | |
([\w-]+://? | www[.]) | |
# anything but whitespace or brackets | |
[^\s()<>]+ | |
# letters and numbers in parens |
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/perl | |
use utf8; | |
use YAML::XS qw(Load); | |
binmode $_, ':encoding(utf8)' for (*STDIN, *STDOUT, *STDERR, *DATA); | |
#no utf8; # its interfering with the DATA loading | |
my $authors2email = Load(join "", <DATA>); | |
exit; |
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/perl -w | |
use strict; | |
use warnings; | |
use Benchmark qw(cmpthese); | |
BEGIN { | |
*CORE::GLOBAL::require = sub { | |
return CORE::require $_[0]; |
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/local/bin/perl | |
use perl5i::0; | |
use File::Copy; | |
my %Is; | |
my $builder; | |
my $build_file; | |
my @build_args; |
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
#!/bin/bash | |
# Find the child of the current (or supplied) commit. | |
REV=$1 | |
if [ x$REV == x ]; then | |
REV="HEAD" | |
fi |
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/perl -w | |
use strict; | |
use warnings; | |
use List::MoreUtils qw(uniq); | |
use Benchmark qw(cmpthese); | |
sub somni_uniq { my %seen; grep { !$seen{$_}++ } @_ } |
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
#include <time.h> | |
#include <stdio.h> | |
int main() { | |
time_t now = -4136232677718LL; | |
printf("%lld\n", (long long int)timegm(gmtime(&now))); | |
return 0; | |
} |
OlderNewer