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 feature 'say'; | |
use Try::Tiny; | |
use Exception::Class ( | |
'MyException', | |
'AnotherException' => { isa => 'MyException' }, |
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 Exception::Class::OnCaller; | |
use strict; | |
use warnings; | |
use Sub::Exporter -setup => { | |
exports => [ | |
ex => \&build_named_exception_builder, | |
], | |
}; |
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 strict; use warnings; | |
use Config::Std; | |
use HTTP::Request::Common qw(POST); | |
use LWP::UserAgent; | |
use Parallel::ForkManager; | |
use Benchmark; |
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 5.10.1; | |
use strict; | |
use warnings; | |
use HTTP::Request::Common 'POST'; | |
use AnyEvent::HTTP; | |
use Benchmark; |
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 5.10.1; | |
use strict; | |
use warnings; | |
use HTTP::Request::Common 'POST'; | |
use AnyEvent::HTTP; | |
use Benchmark; |
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 | |
# $Id: parallel.pl,v 1.7 2008/05/06 20:41:33 dk Exp $ | |
# | |
# This example fetches two pages in parallel, one with http/1.0 another with | |
# http/1.1 . The idea is to demonstrate three different ways of doing so, by | |
# using object API, and explicit and implicit loop unrolling | |
# | |
use strict; | |
use warnings; |
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 strict; | |
use warnings; | |
package Parallel::Downloader; | |
use Moose; | |
use MooseX::HasDefaults::RO; | |
has requests => ( isa => 'ArrayRef', required => 1 ); | |
has responses => ( isa => 'ArrayRef', default => sub {[]} ); |
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 strict; | |
use warnings; | |
package Parallel::Downloader; | |
=head1 SYNOPSIS | |
use HTTP::Request::Common qw( GET POST ); | |
use Parallel::Downloader 'async_download'; |
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
D:\Ubic>dzil test | |
!!! [AutoPrereq] will be removed in Dist::Zilla v5; replace it with [AutoPrereqs] (note the 's') | |
[DZ] building test distribution under .build\FfXTuvYCFd | |
[DZ] beginning to build Ubic | |
[DZ] guessing dist's main_module is lib/Ubic.pm | |
[DZ] extracting distribution abstract from lib/Ubic.pm | |
[PodWeaver] [@Default/Name] couldn't find abstract in lib/Ubic/Daemon/OS/POSIX.pm | |
[PodWeaver] [@Default/Name] couldn't find abstract in lib/Ubic/Daemon/OS/Linux.pm | |
[@Filter/ExtraTests] rewriting release test xt/release/pod-coverage.t |
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 strict; | |
use warnings; | |
package test_case; | |
use HTTP::Request::Common qw'POST GET'; | |
use LWP::UserAgent; | |
use AnyEvent::HTTP; | |
use Data::Dumper; |