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
Testing 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
package Main; | |
use base qw/DBIx::Class::Schema/; | |
__PACKAGE__->load_namespaces; | |
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
package MyModule; | |
use Moose; | |
with 'MyModule::RequireAttr'; | |
has attr => ( | |
isa => 'Str', | |
is => 'rw', | |
); |
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 Xpto; | |
use Moose; | |
has built => ( | |
isa => 'Int', | |
is => 'rw', | |
clearer => 'clear_built', | |
builder => '_build_built', | |
); |
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
<body> | |
<select id="teste"> | |
<option>item 1</option> | |
<option>item 2</option> | |
<option>item 3</option> | |
<option>item 4</option> | |
</select> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function() |
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; |
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
#!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
#!/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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Benchmark 'cmpthese'; | |
use Method::Signatures ':DEBUG'; | |
sub sub_empty { } | |
func func_empty {} |
OlderNewer