DBIx-Class
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
# we are in the process of (re)writing the makefile - some things we
# call below very well may fail
local $ENV{DBICTEST_NO_MAKEFILE_VERIFICATION} = 1;
require File::Spec;
# string-eval, not do(), because we need to provide the
# $mm_proto, $reqs and $*_requires lexicals to the included file
# (some includes *do* modify $reqs above)
for my $inc (sort glob ( File::Spec->catfile('maint', 'Makefile.PL.inc', '*') ) ) {
my $src = do { local (@ARGV, $/) = $inc; <> } or die $!;
eval "use warnings; use strict; $src" or die sprintf
"Failed execution of %s: %s\n",
$inc,
($@ || $! || 'Unknown error'),
;
}
}
examples/Benchmarks/benchmark_hashrefinflator.pl view on Meta::CPAN
no-cpufreq-checks
/);
if (
!$args->{'no-cpufreq-checks'}
and
$^O eq 'linux'
and
-r '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq'
) {
my ($min_freq, $max_freq, $governor) = map { local @ARGV = $_; my $s = <>; chomp $s; $s } qw|
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|;
if ($min_freq != $max_freq) {
die "Your OS seems to have an active CPU governor '$governor' -"
. ' this will render benchmark results meaningless. Disable it'
. ' by setting /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq'
. ' to the same value as /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq'
maint/Makefile.PL.inc/53_autogen_pod.pl view on Meta::CPAN
# it will *not* be copied over due to not being listed at the top
# of MANIFEST.SKIP - this is a *good* thing
# we only want to ship a script/dbicadmin, with the POD appended
# (see inject_dbicadmin_pod.pl), but still want to spellcheck and
# whatnot the intermediate step
my $pod_fn = "$pod_dir/dbicadmin.pod";
# if the author doesn't have the prereqs, don't fail the initial "perl Makefile.pl" step
my $great_success;
{
local @ARGV = ('--documentation-as-pod', $pod_fn);
local $0 = 'dbicadmin';
local *CORE::GLOBAL::exit = sub { $great_success++; die; };
do 'script/dbicadmin';
}
if (!$great_success and ($@ || $!) ) {
printf ("FAILED!!! Subsequent `make dist` will fail. %s\n",
$ENV{DBICDIST_DEBUG}
? 'Full error: ' . ($@ || $!)
: 'Re-run with $ENV{DBICDIST_DEBUG} set for more info'
);
t/35exception_inaction.t view on Meta::CPAN
open(my $stderr_copy, '>&', *STDERR) or die "Unable to dup STDERR: $!";
my $tf = File::Temp->new( UNLINK => 1 );
my $output;
ESCAPE:
{
my $guard = scope_guard {
close STDERR;
open(STDERR, '>&', $stderr_copy);
$output = do { local (@ARGV, $/) = $tf; <> };
close $tf;
unlink $tf;
undef $tf;
close $stderr_copy;
};
close STDERR;
open(STDERR, '>&', $tf) or die "Unable to reopen STDERR: $!";
$schema->storage->ensure_connected;
t/lib/DBICTest.pm view on Meta::CPAN
if ( ($ENV{TRAVIS}||'') eq 'true' and my $old_dbg = $schema->storage->debug ) {
$guard = Scope::Guard->new(sub { $schema->storage->debug($old_dbg) });
$schema->storage->debug(0);
}
if ($ENV{"DBICTEST_SQLT_DEPLOY"}) {
$schema->deploy($args);
} else {
my $filename = Path::Class::File->new(__FILE__)->dir
->file('sqlite.sql')->stringify;
my $sql = do { local (@ARGV, $/) = $filename ; <> };
for my $chunk ( split (/;\s*\n+/, $sql) ) {
if ( $chunk =~ / ^ (?! --\s* ) \S /xm ) { # there is some real sql in the chunk - a non-space at the start of the string which is not a comment
$schema->storage->dbh_do(sub { $_[1]->do($chunk) }) or print "Error on SQL: $chunk\n";
}
}
}
return;
}
=head2 populate_schema
xt/footers.t view on Meta::CPAN
L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
};
find({
wanted => sub {
my $fn = $_;
return unless -f $fn;
return unless $fn =~ / \. (?: pm | pod ) $ /ix;
my $data = do { local (@ARGV, $/) = $fn; <> };
if ($data !~ /^=head1 NAME/m) {
# the generator is full of false positives, .pod is where it's at
return if $fn =~ qr{\Qlib/DBIx/Class/Optional/Dependencies.pm};
ok ( $data !~ /\bcopyright\b/i, "No copyright notices in $fn without apparent POD" );
}
elsif ($fn =~ qr{\Qlib/DBIx/Class.}) {
# nothing to check there - a static set of words
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.555 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )