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 MooseX::Declare; | |
class People{ | |
# class attributes | |
has 'name' => ( is => 'rw', isa => 'Str' ); | |
has 'age' => ( is => 'rw', isa => 'Num' ); | |
# Method that speak with us |
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
my @array_a = (1 .. 10); | |
my @array_b = ( 9 .. 15); | |
foreach my $item (@array_a) { | |
if(grep { $_ eq $item} @array_b) { | |
say $item ."Yes baby!!!"; | |
} else { | |
say $item ." No!!!\n"; |
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/perl | |
# (c) 2011 Bivee. All rights reserveds. | |
# author dvicniguerra < dan.vinciguerra at gmail.com > | |
# | |
# This script is distributed under Perl Itself License | |
# | |
package Gmail::SendMail; | |
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 WWW::FGen; | |
use WWW::Mechanize; | |
# constructor | |
sub new { | |
my $class = shift; | |
return bless { | |
_mechanize => WWW::Mechanize->new( agent => 'Perl of Love' ), | |
_url => 'http://mendel.cs.rhul.ac.uk/mendel.php?topic=fgen-file', |
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/perl -w | |
use strict; | |
use Mail::Internet; | |
my $mail = Mail::Internet->new(\*STDIN); | |
# carrega informações | |
my $from = $mail->head->get("From") || ""; | |
my $subject = $mail->head->get("Subject")|| ""; |
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
function YAPCBrasilAD() { | |
document.write('<div style="font-family:TexGyreAdventor,Trebuchet MS,Verdana;color: #666;-webkit-font-smoothing: antialiased;font-size:10pt;margin:10px;padding:10px;border-radius:5px;height:100px;width:480px;background-color:#e6e6e6;overflow:hidden;-moz-border-radius: 5px;-webkit-border-radius: 5px;"><div style="text-align: center;vertical-align:middle;float: left; margin: 0px; padding: 0px; height: 90px; width: 120px"><img style="margin: 20px;" src="http://yapcbrasil.org.br/2012/images/logo_footer.png"></div>'); | |
document.write('<div style="float: right; margin: 0px; padding: 0px; height: 90px; width: 360px"><strong><a style="text-color: #8f0000;font-size:10pt;text-decoration:none;" href="http://www.yapcbrasil.org.br">YAPC::Brasil 2012 — A revolução dos dados</a></strong><br>Submeta sua palestra: Jornalismo de Dados e Dados Abertos; Bioinformática; Empreendedorismo e Políticas Públicas; e Perl Hacking<br><a style="text-color: #8f |
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 DateTime; | |
use Mojolicious::Lite; | |
get '/' => 'index'; | |
get '/service/datetime' => sub { | |
my $self = shift; | |
my $dt = DateTime->now; |
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/perl | |
use Mojolicious::Lite; | |
get '/' => { message => '' } => 'index'; | |
post '/' => sub { | |
my $self = shift; | |
# getting params | |
my $email = $self->param('email') || ''; |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ index.pl/$1 [QSA,L] | |
</IfModule> | |
DirectoryIndex index.pl index.html index.htm ~/404.html |
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
# Singleton Class | |
package Singleton; | |
# global instance | |
our $_instance; | |
# construct or return a valid instance | |
sub instance { | |
my $class = shift; | |
unless ($_instance){ |
OlderNewer