view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/PerlAdvent/2018.pm view on Meta::CPAN
package Acme::CPANModules::Import::PerlAdvent::2018;
our $DATE = '2018-12-30'; # DATE
our $VERSION = '0.001'; # VERSION
our $LIST = {description=>"This list is generated by extracting module names mentioned in [http://perladvent.org/2018/] (retrieved on 2018-12-30). Visit the URL for the full contents.",entries=>[{module=>"Memoize"},{module=>"Convert::ASN1"},{module=>...
1;
# ABSTRACT: Modules mentioned in Perl Advent Calendar 2018
__END__
lib/Acme/CPANModules/Import/PerlAdvent/2018.pm view on Meta::CPAN
=item * L<JSON::XS>
=item * L<XML::Compile::SOAP>
=item * L<Data::Rmap>
=item * L<Array::Sticky>
=item * L<Array::Sticky::INC>
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/http_advent.perldancer.org_2018_16 view on Meta::CPAN
return 1 if $self->get_invalid_queues( @queues );
return 0;
}
sub get_invalid_queues( $self, @queues ) {
my %queue_map;
@queue_map{ @QUEUE_TYPES } = ();
my @invalid_queues = grep !exists $queue_map{ $_ }, @queues;
return @invalid_queues;
}</pre>
<p>With that in place, it was easy for our <code>queue_job()</code> method to throw an error if the developer tried to add a job to an invalid queue:</p>
<pre class="prettyprint">sub queue_job( $self, $args ) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANModules/Import/RSAVAGE/ClassesRolesWithMooAndMoos.pm view on Meta::CPAN
our $DATE = '2018-09-22'; # DATE
our $VERSION = '0.001'; # VERSION
our $LIST = {
description => "This list is generated by extracting module names mentioned in the article [http://savage.net.au/Module-reviews/html/gci.2012.url.mapper.modules.html] (retrieved on 2016-02-21). For the full article, visit the URL.",
entries => [
{ module => "CGI::Application::Plugin::ActionDispatch" },
{ module => "CGI::Application::Plugin::REST" },
{ module => "CGI::Application::Plugin::Routes" },
{ module => "CGI::Application::URIMapping" },
lib/Acme/CPANModules/Import/RSAVAGE/ClassesRolesWithMooAndMoos.pm view on Meta::CPAN
=head1 DESCRIPTION
Classes and Roles with Moo and Moos (2012).
This list is generated by extracting module names mentioned in the article [http://savage.net.au/Module-reviews/html/gci.2012.url.mapper.modules.html] (retrieved on 2016-02-21). For the full article, visit the URL.
=head1 INCLUDED MODULES
=over
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Cake.pm view on Meta::CPAN
AZMo3+wM3GuxVZREk0+VREuAJ5OnHPfH5FVonTNN1mUIl44vlcMKlxoQHNKDjkr5OpcIVRRtj/BE
DfRldgBpH8UQMmXIEuIgE2aRk65KG5Uidzb5YDsW/kAsxzQUuV2WDPai1BJWioYVZFOmiZydUBhL
gEVFovG+wLasvDxFxsDUqLMqHJIlStkU30QwFVjUbA1jFJUFFQiM0PqQpdiDinjnD8kdGDKlBRlw
15N3tGzarg5p3GTJAbmDb8sCbGnZQABlOX3cDxy+9FHTFsrsyFtQVRAESdL5KMAirZpGlBRFDhGQ
KCXQRtBVGijKk4KRlOO10UIcVutMCHFxdMKKi/o/JLwvwgLhFrsoiomuCEuQjWCo0TQETg3ylwQo
L2KK2oVECaCFp9gbKQMikNAJkyjuVMDB42pV/mapUqKhPgzk7CpGuCo7ISUopjIGp7Xx2bx1N/mv
7FlSws2dONQ89nKxSJFKKaphXJki4SplY5Nfoo2hJORqZEybTBStgDJf28oovfFrmjPIo5FXQGMs
Ml1yTGbgwrpxyUlaLsyCMigE0Q1QDHRFKioSpNAE52qIQFFp/aiAbdcEp32Aw2tgCgvcJfbGyjJT
dmiKG1wQAJ+AASgUlQCpWMAk6i2YNgTJWiaKhpFrgCrZUeGmBuhMyoHFckFCcUFBUOwKYBCoTKIl
TVM58kNv6NRBCbj+i2o5PNNAQ1Q9lgRKLi+Sd1MopMmT44AzYFR1YZblz2jVdmaoZLIIlL2J7KJc
L5sIqiopioKpdlICrIbd9kDhkcXT6Ky800BkSslS4KN3FSXJG3a/giNAClNcWSmBUY7v0W4RS4QR
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Normalise multipart versions
$s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg;
}
$s =~ s/^(\d+)\.?//;
my $l = $1 || 0;
my @v = map {
$_ . '0' x (3 - length $_)
} $s =~ /(\d{1,3})\D?/g;
$l = $l . '.' . join '', @v if @v;
return $l + 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Chef.pm view on Meta::CPAN
$_->compile() foreach @recipes;
$self->{start_recipe} = $recipes[0]->recipe_name();
$self->{recipes} = {
map { ($_->recipe_name(), $_) } @recipes
};
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/pod-spelling.t view on Meta::CPAN
plan skip_all => 'POD tests are only run in RELEASE_TESTING mode.' unless $ENV{'RELEASE_TESTING'};
eval 'use Test::Spelling 0.19';
plan skip_all => 'Test::Spelling v0.19 required for testing POD' if $@;
add_stopwords( map { split /[\s\:\-]/ } readline(*DATA) );
$ENV{LANG} = 'C';
all_pod_files_spelling_ok();
__DATA__
MERCHANTABILITY
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-tools.t view on Meta::CPAN
ok($tools, 'shell_tools returns tools');
is(ref($tools), 'ARRAY', 'shell_tools returns arrayref');
ok(scalar(@$tools) >= 5, 'At least 5 tools defined');
# Check tool names
my %tool_names = map { $_->name => $_ } @$tools;
ok(exists $tool_names{execute_command}, 'execute_command tool exists');
ok(exists $tool_names{read_file}, 'read_file tool exists');
ok(exists $tool_names{list_directory}, 'list_directory tool exists');
ok(exists $tool_names{search_files}, 'search_files tool exists');
ok(exists $tool_names{get_system_info}, 'get_system_info tool exists');
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Normalise multipart versions
$s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg;
}
$s =~ s/^(\d+)\.?//;
my $l = $1 || 0;
my @v = map {
$_ . '0' x (3 - length $_)
} $s =~ /(\d{1,3})\D?/g;
$l = $l . '.' . join '', @v if @v;
return $l + 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
BEGIN {
use strict; use warnings;
my %missing = map {
eval qq{ require $_ };
$@ ? ($_=>1) : ()
} qw( experimental warnings );
if(%missing)
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Colour/Fuzzy.pm view on Meta::CPAN
# FIXME use some real metric, not made-up computations
my $max_distance = $similar[-1]{distance};
my $pivot = max( ( $max_distance * 9 / 13 ), 1 );
foreach my $similar ( @similar ) {
my @words = map { /^(dark)(\w+)/ ? ( $1, $2 ) : ( $_ ) }
map { s/\d+//; $_ } # remove numbers
split /[ \-]+/, $similar->{name};
my $weight = ( $pivot - $similar->{distance} ) / $pivot;
foreach( @words ) {
$words{$_} += $weight;
}
}
my @weights = sort { $b->[1] <=> $a->[1] }
map [ $_ => $words{$_} ],
keys %words;
my @names;
my $first_weight = $weights[0][1];
foreach my $weight ( @weights ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Colour.pm view on Meta::CPAN
tie my %COLOURS, 'Graphics::ColorNames', 'X';
foreach my $colour ( keys %COLOURS ) {
next if $colour =~ /\d/;
my ( $r, $g, $b )
= map { hex($_) / 255 }
( $COLOURS{$colour}
=~ /^\#?([\da-f][\da-f])([\da-f][\da-f])([\da-f][\da-f])/i
);
$r{$colour} = $r;
$g{$colour} = $g;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
die "tests_recursive dir '$dir' does not exist";
}
require File::Find;
%test_dir = ();
File::Find::find( \&_wanted_t, $dir );
$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
}
sub write {
my $self = shift;
die "&Makefile->write() takes no arguments\n" if @_;
inc/Module/Install/Makefile.pm view on Meta::CPAN
}
# merge both kinds of requires into prereq_pm
my $prereq = ($args->{PREREQ_PM} ||= {});
%$prereq = ( %$prereq,
map { @$_ }
map { @$_ }
grep $_,
($self->build_requires, $self->requires)
);
# merge both kinds of requires into prereq_pm
inc/Module/Install/Makefile.pm view on Meta::CPAN
. "but we need version >= $perl_version";
}
$args->{INSTALLDIRS} = $self->installdirs;
my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
my $user_preop = delete $args{dist}->{PREOP};
if (my $preop = $self->admin->preop($user_preop)) {
$args{dist} = $preop;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
if ( my $p = $redstring->{myth_place} ) {
push @x, (
"there are clues about $p in the Bible",
"there are clues about $p in the Voynich manuscript",
"$p is on some old maps",
"$p is on Google Maps",
);
}
if ( my $art = $redstring->{artifact} ) {
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
push @x, (
"the Wikipedia entry for $p keeps getting edited by $bad",
# This has singular/plural problems - how to solve?
"$bad has ties to $p",
"$p probably isn't a real place anyway",
"$p isn't shown on any maps",
);
}
for my $actor ( qw/ protagonists antagonists / ) {
next unless $redstring->{$actor}{name};
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
"'$name' is an anagram of '$topicname' (if you spell it wrong)",
);
}
}
my @evidences = List::Util::uniq( map { _RANDOM_(@x) } 1..2 );
if ( @evidences == 2 ) {
my ( $e1, $e2 ) = @evidences;
return _RANDOM_(
"You can tell this is the truth because $e1, and $e2.",
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
sub numerology {
my $redstring = shift // {};
my @strings = List::Util::uniq(
grep { length }
map { my $letters = uc( $_ ); $letters =~ s/[^A-Z0-9]//g; $letters }
map {
/^(the )(.+)$/i ? $2 : $_
}
map {
ref( $_ ) ? grep( defined, $_->{name}, $_->{shortname}, $_->{title}, $_->{author} ) : $_
}
values( %$redstring )
);
my %calcs;
foreach my $string ( @strings ) {
next if length($string) >= 20;
my @letters = split //, $string;
my @numbers = map /[A-Z]/ ? ( ord($_) - 0x40 ) : $_, @letters;
my $sum = List::Util::sum( @numbers );
push @{ $calcs{$sum} ||= [] }, sprintf(
'%s = %s = %s',
join( '+', @letters ),
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
push @{ $calcs{$key} }, "And guess what? " . $statement;
}
}
}
my @wow = map { @$_ > 1 ? @$_ : () } values %calcs;
if ( @wow ) {
return sprintf(
"%s %s",
_RANDOM_(
lib/Acme/ConspiracyTheory/Random.pm view on Meta::CPAN
'Trust the numbers.',
'You can see the truth in the numbers.',
),
join(
'',
map( "$_. ", @wow ),
)
);
}
return '';
view all matches for this distribution