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
| package MIME::Lite::TLS; | |
| use strict; | |
| use warnings; | |
| use Net::SMTP::TLS; | |
| use parent 'MIME::Lite'; | |
| =head1 NAME |
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
| HTTP (Starman) vs FastCGI (fastpass) | |
| HTTP | |
| Pros: | |
| HTTP, easy for humans to debug | |
| Also works directly behind load-balancers (without frontends) | |
| Many PSGI server implementations, preforking Starman, Starlet and non-blocking Twiggy | |
| Cons: |
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/sh | |
| # | |
| # Use this as Jenkins Build "Execute shell" script | |
| # | |
| # Pedro Melo <melo@simplicidade.org> | |
| ## Die on any errors | |
| set -ex | |
| export OUTPUT=$WORKSPACE/logs |
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
| # | |
| # Edited Class::MOP to this, around line 120: | |
| catch { | |
| unless (/^Can't locate \Q$file\E in \@INC/) { | |
| # uncomment next line to temporarily work-around the problem | |
| # s/ at / AT /gsm; | |
| print "\n\n-------\n$_\n\n---------\n\n"; | |
| confess "Couldn't load class ($name) because: $_"; |
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
| ################## | |
| # Error management | |
| has 'errors' => ( | |
| traits => ['Hash'], | |
| is => 'bare', | |
| isa => 'HashRef', | |
| default => sub { {} }, | |
| handles => { | |
| add_error => 'set', |
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 strict; | |
| use warnings; | |
| use Benchmark 'cmpthese'; | |
| use Method::Signatures ':DEBUG'; | |
| sub sub_empty { } | |
| func func_empty {} |
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 | |
| # | |
| # PS1 magic | |
| # | |
| # Mostly copied from YUVAL KOGMAN version, added my own __git_ps1 stuff | |
| # Original: http://gist.github.com/621452 | |
| # | |
| # See video demo of this at http://vimeo.com/15789794 | |
| # | |
| # To enable save as .bash_prompt in $HOME and add to .bashrc: |
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
| #!perl | |
| use strict; | |
| use warnings; | |
| use lib 'lib'; | |
| use Redis; | |
| use Benchmark qw( cmpthese ); | |
| my $r = Redis->new(encoding => undef); |
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
| package Tarpipe::Connector::Digest; | |
| use strict; | |
| use warnings; | |
| use Plack::App::Tarpipe; | |
| use Digest::SHA1 qw(sha1_hex); | |
| use Digest::MD5 qw(md5_hex); | |
| ## Definition of the connector | |
| ## GET uri will return the proper XML |
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
| package MyClass; | |
| use Moose; | |
| use MyTypes qw( MyDate ); | |
| use namespace::clean -except => 'meta'; | |
| has bday => (isa => MyDate, is => 'ro', coerce => 1); | |
| __PACKAGE__->meta->make_immutable; | |
| 1; |