view release on metacpan or search on metacpan
lib/PAGI/Tools/Cookbook.pod view on Meta::CPAN
use warnings;
use Test2::V0;
use PAGI::Test::Client;
# Load your app
my $app = require './app.pl';
my $client = PAGI::Test::Client->new(app => $app);
subtest 'GET /' => sub {
my $res = $client->get('/');
is $res->status, 200, 'status is 200';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PAUSEx/Log.pm view on Meta::CPAN
this function will automatically pick up.
=cut
sub fetch_log ( $class, $user = $ENV{CPAN_USER}, $pass = $ENV{CPAN_PASS} ) {
state $rc = require Mojo::UserAgent;
state $ua = Mojo::UserAgent->new;
state $url_template = 'https://%s:%s@pause.perl.org/pause/authenquery?ACTION=tail_logfile&pause99_tail_logfile_1=5000&pause99_tail_logfile_sub=Tail+characters';
state $url = sprintf $url_template, $user, $pass;
my $tx = $ua->get( $url );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PDF/Builder/NamedDestination.pm view on Meta::CPAN
my ($location, @arglist, $ptr);
my %arg_counts = (
# key = location given by user
# [0] = required number of arguments, [1] = name for PDF
'xyz' => [3, 'XYZ' ], # s/b array ref
'fit' => [0, 'Fit' ], # 1 (scalar) ignored
'fith' => [1, 'FitH' ], # s/b scalar
'fitv' => [1, 'FitV' ], # s/b scalar
'fitr' => [4, 'FitR' ], # s/b array ref
lib/PDF/Builder/NamedDestination.pm view on Meta::CPAN
# nothing passed in?
if (!@args) { return @args; }
my %arg_counts = (
# key = location given by user
# value = required number of arguments
'xyz' => 3,
'fit' => 0,
'fith' => 1,
'fitv' => 1,
'fitr' => 4,
view all matches for this distribution
view release on metacpan or search on metacpan
matio-1.5.0/getopt/getopt_long.c view on Meta::CPAN
return (BADCH);
#else
return (BADARG);
#endif
}
if (long_options[match].has_arg == required_argument ||
long_options[match].has_arg == optional_argument) {
if (has_equal)
optarg = has_equal;
else if (long_options[match].has_arg ==
required_argument) {
matio-1.5.0/getopt/getopt_long.c view on Meta::CPAN
* optional argument doesn't use next nargv
*/
optarg = nargv[optind++];
}
}
if ((long_options[match].has_arg == required_argument)
&& (optarg == NULL)) {
/*
* Missing argument; leading ':' indicates no error
* should be generated.
*/
view all matches for this distribution
view release on metacpan or search on metacpan
-phase = runtime
-relationship = recommends
[Prereqs / TestRequires]
-phase = test
-relationship = requires
[Prereqs / AuthorDeps]
-phase = develop
-relationship = requires
[Test::Compile]
[ModuleBuild]
view all matches for this distribution
view release on metacpan or search on metacpan
Term::Encoding = 0
Term::UI = 0
[Prereqs / TestRequires]
-phase = test
-relationship = requires
Test::Most = 0
[Prereqs / AuthorDeps]
-phase = develop
-relationship = requires
IO::Socket::IP = 0
Module::Spy = 0
Test::MockModule = 0
Test::PostgreSQL = 0
Test::MockObject = 0
view all matches for this distribution
view release on metacpan or search on metacpan
-phase = develop
-relationship = recommends
[Prereqs / TestRequires]
-phase = test
-relationship = requires
Test::Most = 0
[Prereqs / AuthorDeps]
-phase = develop
-relationship = requires
Treex::Core = 0
[Test::Compile]
[ModuleBuild]
view all matches for this distribution
view release on metacpan or search on metacpan
footer = | close FH;
footer = |}
[DynamicPrereqs]
-condition = prompt_default_no('Do you want to enable optional TLS support ( requires POE::Component::SSLify )')
-body = requires('POE::Component::SSLify','0.10')
[Prereqs / ConfigureRequires]
ExtUtils::MakeMaker = 0
[Prereqs / BuildRequires]
view all matches for this distribution
view release on metacpan or search on metacpan
[@BINGOS]
[DynamicPrereqs]
-condition = prompt_default_no('Do you want encryption ( requires Mcrypt )')
-body = requires( 'Mcrypt' => '2.5.7.0' );
[Prereqs / TestRequires]
Test::More = 0.47
[Prereqs]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POE/Component/Server/IRC.pm view on Meta::CPAN
my $count = @$args;
# - parv[0] = nickname
# - parv[1] = TS
# - parv[2] = [-][raw]
# - parv[3] = required user mode(s) to see the tag
# - parv[4] = tag line
SWITCH: {
if (!$self->_state_sid_serv($prefix) && $prefix ne $sid) {
last SWITCH;
view all matches for this distribution
view release on metacpan or search on metacpan
footer = | close FH;
footer = |}
[DynamicPrereqs]
-condition = prompt_default_no('Do you want encryption ( requires Mcrypt )')
-body = requires( 'Mcrypt' => '2.5.7.0' );
[Prereqs / TestRequires]
Test::More = 0.47
[Prereqs]
view all matches for this distribution
view release on metacpan or search on metacpan
[@BINGOS]
[DynamicPrereqs]
-condition = prompt_default_no('Do you want to install optional module File::LibMagic')
-body = requires('File::LibMagic','1.15')
[Prereqs / ConfigureRequires]
ExtUtils::MakeMaker = 0
[Prereqs / BuildRequires]
view all matches for this distribution
view release on metacpan or search on metacpan
[@BINGOS]
[DynamicPrereqs]
-condition = is_os('MSWin32')
-body = requires( 'POE::Wheel::Run::Win32' => 0.10 );
-body = requires( 'Win32API::File' => 0 );
[Prereqs / TestRequires]
Test::Harness = 3.14
Test::More = 0.47
view all matches for this distribution
view release on metacpan or search on metacpan
[Git::Commit]
[Git::Tag]
[Git::Push]
[Prereqs / ConfigureRequires]
-phase = configure
-type = requires
Devel::CheckLib = 0
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
But, it's more interesting than that. You can load it with C<require>
and call C<arguments> to get the data structure it passes to
C<WriteMakefile>:
my $package = require '/path/to/Makefile.PL';
my $arguments = $package->arguments;
Note that C<require>-ing a file makes an entry in C<%INC> for exactly
that name. If you try to C<require> another file with the same name,
even from a different path, C<require> thinks it has already loaded
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
But, it's more interesting than that. You can load it with C<require>
and call C<arguments> to get the data structure it passes to
C<WriteMakefile>:
my $package = require '/path/to/Makefile.PL';
my $arguments = $package->arguments;
Note that C<require>-ing a file makes an entry in C<%INC> for exactly
that name. If you try to C<require> another file with the same name,
even from a different path, C<require> thinks it has already loaded
view all matches for this distribution
view release on metacpan or search on metacpan
[Prereqs / TestRequires]
Test::More = 0.96
[DynamicPrereqs]
-body = requires('File::Spec', is_os('MSWin32') ? '3.2701' : '0.84');
-body = requires('IO::String') if $] < '5.008000';
[Git::GatherDir]
exclude_filename = README.pod
[MetaYAML]
[MetaJSON]
view all matches for this distribution
view release on metacpan or search on metacpan
Test::MinimumVersion.max_target_perl = 5.008001
; authordep ExtUtils::HasCompiler = 0.014
[DynamicPrereqs]
:version = 0.029
-body = requires('Package::Stash::XS', '0.26') if !want_pp() and can_xs();
; authordep Dist::Zilla::Plugin::SurgicalPodWeaver
[Prereqs / TestRequires]
Test::More = 0.88
view all matches for this distribution
view release on metacpan or search on metacpan
[RemovePrereqs::Provided / @Author::KENTNL/RemovePrereqs::Provided]
[Prereqs / @Author::KENTNL/::Role::BundleDeps]
; twitter_extra_hash_tags =
-phase = develop
-relationship = requires
Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes = 0.004002
Dist::Zilla::Plugin::Author::KENTNL::TravisCI = 0.001002
Dist::Zilla::Plugin::Authority = 1.006
Dist::Zilla::Plugin::AutoPrereqs = 0
Dist::Zilla::Plugin::BumpVersionAfterRelease = 0
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Panda/Install/Payload.pm view on Meta::CPAN
my $module = shift;
my $info = $module_info{$module};
unless ($info) {
my $file = module_info_file($module) or return undef;
return undef unless -f $file;
$info = require $file or return undef;
$module_info{$module} = $info;
}
return $info;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/function.t view on Meta::CPAN
my $received;
my $s = 'world';
_vs({
schema => { x => {
type => 'stringref',
optional => sub { $received = $_[0]; 0 }, # 0 = required; just capture
} },
input => { x => \$s },
});
ok(ref($received) eq 'SCALAR', 'optional coderef receives the original SCALAR ref');
is(${$received}, 'world', 'the ref still points to the correct string value');
view all matches for this distribution
view release on metacpan or search on metacpan
; version_rel_hour = 1
; version_rel_time_zone = Pacific/Auckland
; twitter_extra_hash_tags =
; auto_prereqs_skip = File::Find
-phase = develop
-relationship = requires
Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes = 0.004002
Dist::Zilla::Plugin::Author::KENTNL::TravisCI = 0.001002
Dist::Zilla::Plugin::Authority = 1.006
Dist::Zilla::Plugin::AutoPrereqs = 0
Dist::Zilla::Plugin::BumpVersionAfterRelease = 0
view all matches for this distribution
view release on metacpan or search on metacpan
; version_rel_hour = 4
; version_rel_time_zone = Pacific/Auckland
; twitter_extra_hash_tags =
; auto_prereqs_skip = File::Find
-phase = develop
-relationship = requires
Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes = 0.004002
Dist::Zilla::Plugin::Author::KENTNL::TravisCI = 0.001002
Dist::Zilla::Plugin::Authority = 1.006
Dist::Zilla::Plugin::AutoPrereqs = 0
Dist::Zilla::Plugin::BumpVersionAfterRelease = 0
view all matches for this distribution
view release on metacpan or search on metacpan
[RemovePrereqs::Provided / @Author::KENTNL/RemovePrereqs::Provided]
[Prereqs / @Author::KENTNL/::Role::BundleDeps]
-phase = develop
-relationship = requires
Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes = 0.004002
Dist::Zilla::Plugin::Author::KENTNL::TravisCI = 0.001002
Dist::Zilla::Plugin::Authority = 1.006
Dist::Zilla::Plugin::AutoPrereqs = 0
Dist::Zilla::Plugin::BumpVersionAfterRelease = 0
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
But, it's more interesting than that. You can load it with C<require>
and call C<arguments> to get the data structure it passes to
C<WriteMakefile>:
my $package = require '/path/to/Makefile.PL';
my $arguments = $package->arguments;
Note that C<require>-ing a file makes an entry in C<%INC> for exactly
that name. If you try to C<require> another file with the same name,
even from a different path, C<require> thinks it has already loaded
view all matches for this distribution
view release on metacpan or search on metacpan
t/CodeLayout/ProhibitLongLines/gitattributes.t view on Meta::CPAN
skip_all "could not initialise git repo" unless $dir;
$dir
}
sub test_ignore_attribute () {
my $dir = require_git();
my $policy = Perl::Critic::Policy::CodeLayout::ProhibitLongLines->new;
my $path = write_perl_file($dir, "ignore.t", "$Long_line\n");
my @v = violations_for_file($policy, $path);
is scalar @v, 0, "no violations when attribute is ignore";
}
sub test_numeric_attribute () {
my $dir = require_git();
my $policy = Perl::Critic::Policy::CodeLayout::ProhibitLongLines->new;
# 81-char line is fine under limit of 200
my $path = write_perl_file($dir, "wide.t", "$Long_line\n");
t/CodeLayout/ProhibitLongLines/gitattributes.t view on Meta::CPAN
@v = violations_for_file($policy, $path);
is scalar @v, 1, "201-char line exceeds 200-char override";
}
sub test_unspecified_attribute () {
my $dir = require_git();
my $policy = Perl::Critic::Policy::CodeLayout::ProhibitLongLines->new;
# normal.t has no gitattributes entry, so default 80 applies
my $path = write_perl_file($dir, "normal.t", "$Long_line\n");
t/CodeLayout/ProhibitLongLines/gitattributes.t view on Meta::CPAN
my @v = $policy->violates($doc, $doc);
is scalar @v, 1, "string input (no filename) uses default limit";
}
sub test_feature_disabled () {
my $dir = require_git();
my $policy = Perl::Critic::Policy::CodeLayout::ProhibitLongLines->new;
$policy->{_gitattributes_line_length} = "";
# ignore.t would be ignored if the feature were active
t/CodeLayout/ProhibitLongLines/gitattributes.t view on Meta::CPAN
my @v = violations_for_file($policy, $path);
is scalar @v, 1, "violations reported when feature is disabled";
}
sub test_get_gitattr_line_length () {
my $dir = require_git();
my $policy = Perl::Critic::Policy::CodeLayout::ProhibitLongLines->new;
# Need actual files for git check-attr
write_perl_file($dir, "ignore.t", "1;\n");
t/CodeLayout/ProhibitLongLines/gitattributes.t view on Meta::CPAN
ok !defined $policy->_get_gitattr_line_length(""),
"empty filename returns undef";
}
sub test_relative_path () {
my $dir = require_git();
my $path = write_perl_file($dir, "deep/nested.t", "$Long_line\n");
my $policy = Perl::Critic::Policy::CodeLayout::ProhibitLongLines->new;
is $policy->_get_gitattr_line_length($path), 200,
"absolute path matches slash-containing pattern";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/Critic/Policy/ControlStructures/ProhibitBareBlockLoopControls.pm view on Meta::CPAN
Example F<perlcriticrc>:
[ControlStructures::ProhibitBareBlockLoopControls]
next = forbid
last = require_label
redo = forbid
do_block = forbid
bare_block = follow
Note: This is the default configuration.
view all matches for this distribution
view release on metacpan or search on metacpan
[RecommendedPrereqs]
[AutoPrereqs]
[Prereqs / BuildRequires ]
-phase = build
-relationship = requires
ExtUtils::MakeMaker = 7.22
Module::Metadata = 1.000015
[Prereqs / DevelopRequires ]
-phase = develop
-relationship = requires
ExtUtils::Manifest = 1.68
Test::CPAN::Changes = 0
Test::Vars = 0.015
; [EnsurePrereqsInstalled]
; :version = 0.003
; type = requires
; type = recommends
[SecurityPolicy]
-policy = Individual
-policy_version = 0.10
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
But, it's more interesting than that. You can load it with C<require>
and call C<arguments> to get the data structure it passes to
C<WriteMakefile>:
my $package = require '/path/to/Makefile.PL';
my $arguments = $package->arguments;
Note that C<require>-ing a file makes an entry in C<%INC> for exactly
that name. If you try to C<require> another file with the same name,
even from a different path, C<require> thinks it has already loaded
view all matches for this distribution
view release on metacpan or search on metacpan
examples/tutorial_gen/tut.pl view on Meta::CPAN
$conf_fp = "$path/conf.pl";
}
say ~$path if $dg;
# todo_ require problem
#my $conf_raw = require $conf_fp || die "Conf file '$conf_fp' not loaded;";
#my %conf = hash( $conf_raw );
my %conf = {
index => [
view all matches for this distribution