Skip to content

Instantly share code, notes, and snippets.

View schwern's full-sized avatar

Michael G. Schwern schwern

View GitHub Profile
package Foo;
use parent 'signatures';
sub import {
my $class = shift;
my $caller = shift;
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] );
#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.
# scheme or schemeless
([\w-]+://? | www[.])
# anything but whitespace or brackets
# letters and numbers in parens
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>);
#!/usr/bin/perl -w
use strict;
use warnings;
use Benchmark qw(cmpthese);
*CORE::GLOBAL::require = sub {
return CORE::require $_[0];
use perl5i::0;
use File::Copy;
my %Is;
my $builder;
my $build_file;
my @build_args;
# Find the child of the current (or supplied) commit.
if [ x$REV == x ]; then
#!/usr/bin/perl -w
use strict;
use warnings;
use List::MoreUtils qw(uniq);
use Benchmark qw(cmpthese);
sub somni_uniq { my %seen; grep { !$seen{$_}++ } @_ }
#include <time.h>
#include <stdio.h>
int main() {
time_t now = -4136232677718LL;
printf("%lld\n", (long long int)timegm(gmtime(&now)));
return 0;