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
cpanm (App::cpanminus) 1.4004 on perl 5.012003 built for darwin-2level | |
Work directory is /Users/earino/.cpanm/work/1314132501.52001 | |
You have make /usr/bin/make | |
You have /usr/bin/curl | |
You have /usr/bin/tar: bsdtar 2.6.2 - libarchive 2.6.2 | |
You have /usr/bin/unzip | |
Searching POE on mirror http://lvmirrors.lightningsource.com/CPAN ... | |
Downloading index file http://lvmirrors.lightningsource.com/CPAN/modules/02packages.details.txt.gz ... | |
Uncompressing index file... | |
POE is up to date. (1.312) |
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
# stuff setting up moose and the environment omitted | |
sub BUILD { | |
my $self = shift; | |
my $application_environment = $ENV{'APPLICATION_ENVIRONMENT'}; | |
my $conf = new Config::General($self->config_file); | |
my %config = $conf->getall; |
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 warnings; | |
use strict; | |
use Imager::QRCode; | |
use Data::Dump qw(dump); | |
use String::Random; | |
my @sizes = qw/ 1 2 3 4 5 6 7 8 9 /; |
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
Disconnected => sub { | |
my ($heap, $kernel) = @_[HEAP, KERNEL]; | |
$heap->{'logger'}->error("disconnected from ".$config{'scanner_host'}.":".$config{'scanner_port'}." enqueueing reconnect."); | |
$kernel->delay( reconnect => 60 ); | |
$backoff->failure(); | |
}, | |
ServerError => sub { | |
my ($heap, $kernel) = @_[HEAP, KERNEL]; |
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 POE; | |
use POE::Component::Client::TCP; | |
use Proc::BackOff::Linear; | |
my $backoff = Proc::BackOff::Linear->new( { | |
slope => 5, | |
b => 0, | |
x => 'count' } ); |
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 POE; | |
use POE::Component::Client::TCP; | |
use Proc::BackOff::Random; | |
my $backoff = Proc::BackOff::Random->new( { | |
min => 5 , | |
max => 100 } ); | |
POE::Component::Client::TCP->new( |
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 warnings; | |
use strict; | |
use LWP::UserAgent; | |
use HTTP::Request::Common; | |
my $req = POST 'http://localhost:3000/', | |
Content_Type => 'form-data', |
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
<~/play/bad_upload_handler> $ perl bin/app.pl | |
[54114] core @0.000011> loading Dancer::Handler::Standalone handler in /Users/earino/perl5/lib/perl5/Dancer/Handler.pm l. 45 | |
[54114] core @0.000185> loading handler 'Dancer::Handler::Standalone' in /Users/earino/perl5/lib/perl5/Dancer.pm l. 464 | |
>> Dancer 1.3095 server 54114 listening on http://0.0.0.0:3000 | |
== Entering the development dance floor ... | |
[54114] core @0.000133> request: POST / from 127.0.0.1 in /Users/earino/perl5/lib/perl5/Dancer/Handler.pm l. 56 | |
[54114] core @0.000527> [hit #1]Trying to match 'POST /' against /^\/$/ (generated from '/') in /Users/earino/perl5/lib/perl5/Dancer/Route.pm l. 84 | |
[54114] core @0.000678> [hit #1] --> got 1 in /Users/earino/perl5/lib/perl5/Dancer/Route.pm l. 102 | |
[54114] debug @0.001524> [hit #1]request: $VAR1 = bless( {'_body_params' => {'born' => '1978','email' => '[email protected]','filename' => 'file.jpeg','gender' => 'M','name' => 'Eduardo Arino'},'_chunk_size' => 4096,'_http_body' => bless( {'body' => undef,'boun |
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 @list_of_work = qw/ BLAH BLAH BLAH /; | |
my @list_of_endpoints = qw/ YADDA YADDA YADDA /; | |
for my $unit_of_work (@list_of_work) { | |
for my $endpoint (@list_of_endpoints) { | |
my $value_retrieved = retrieve_value_from_stuff($unit_of_work); | |
do_stuff_to($value_retrieved); | |
push_value_retrieved_to($endpoint); | |
} | |
} |
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 $pm = Parallel::ForkManager->new($PROCESSES); | |
my @list_of_work = qw/ BLAH BLAH BLAH /; | |
my @list_of_endpoints = qw/ YADDA YADDA YADDA /; | |
for my $unit_of_work (@list_of_work) { | |
my $pid = $pm->start and next; | |
for my $endpoint (@list_of_endpoints) { | |
my $value_retrieved = retrieve_value_from_stuff($unit_of_work); |
OlderNewer