Alt-Sub-Delete-NewPackageSeparator
view release on metacpan or search on metacpan
"Carp" : "1.12",
"Config" : "0",
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Test::Builder" : "0",
"Test::Builder::Module" : "0",
"Test::More" : "0",
"lib" : "0",
"overload" : "0",
"threads::shared" : "0",
"vars" : "0",
"warnings" : "0"
}
}
},
"provides" : {
"Alt::Sub::Delete::NewPackageSeparator" : {
"file" : "lib/Alt/Sub/Delete/NewPackageSeparator.pm",
"version" : "1.000022"
}
Carp: '1.12'
Config: '0'
File::Spec: '0'
IO::Handle: '0'
IPC::Open3: '0'
Test::Builder: '0'
Test::Builder::Module: '0'
Test::More: '0'
lib: '0'
overload: '0'
threads::shared: '0'
vars: '0'
warnings: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.031, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
Makefile.PL view on Meta::CPAN
"Carp" => "1.12",
"Config" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Test::Builder" => 0,
"Test::Builder::Module" => 0,
"Test::More" => 0,
"lib" => 0,
"overload" => 0,
"threads::shared" => 0,
"vars" => 0,
"warnings" => 0
},
"VERSION" => "1.000022",
"test" => {
"TESTS" => "t/*.t"
}
);
Makefile.PL view on Meta::CPAN
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Test::Builder" => 0,
"Test::Builder::Module" => 0,
"Test::More" => 0,
"constant" => 0,
"lib" => 0,
"overload" => 0,
"strict" => 0,
"threads::shared" => 0,
"vars" => 0,
"warnings" => 0
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
version = 1.000022
name = Alt-Sub-Delete-NewPackageSeparator
[@Author::PERLANCAR]
:version=0.610
[Prereqs / TestRequires]
lib=0
overload=0
threads::shared=0
vars=0
warnings=0
Carp=1.12
Config=0
Test::Builder=0
Test::Builder::Module=0
Test::More=0
[Prereqs]
perl = 5.008003
t/Test/Builder.pm view on Meta::CPAN
# $^C was only introduced in 5.005-ish. We do this to prevent
# use of uninitialized value warnings in older perls.
$^C ||= 0;
use strict;
use vars qw($VERSION);
$VERSION = '0.32';
$VERSION = eval $VERSION; # make the alpha version come out as a number
# Make Test::Builder thread-safe for ithreads.
BEGIN {
use Config;
# Load threads::shared when threads are turned on
if( $] >= 5.008 && $Config{useithreads} && $INC{'threads.pm'}) {
require threads::shared;
# Hack around YET ANOTHER threads::shared bug. It would
# occassionally forget the contents of the variable when sharing it.
# So we first copy the data, then share, then put our copy back.
*share = sub (\[$@%]) {
my $type = ref $_[0];
my $data;
if( $type eq 'HASH' ) {
%$data = %{$_[0]};
}
elsif( $type eq 'ARRAY' ) {
@$data = @{$_[0]};
}
elsif( $type eq 'SCALAR' ) {
$$data = ${$_[0]};
}
else {
die "Unknown type: ".$type;
}
$_[0] = &threads::shared::share($_[0]);
if( $type eq 'HASH' ) {
%{$_[0]} = %$data;
}
elsif( $type eq 'ARRAY' ) {
@{$_[0]} = @$data;
}
elsif( $type eq 'SCALAR' ) {
${$_[0]} = $$data;
}
else {
die "Unknown type: ".$type;
}
return $_[0];
};
}
# 5.8.0's threads::shared is busted when threads are off.
# We emulate it here.
else {
*share = sub { return $_[0] };
*lock = sub { 0 };
}
}
=head1 NAME
t/Test/Builder.pm view on Meta::CPAN
ok 2
ok 3
or this if false
ok
ok
ok
Most useful when you can't depend on the test output order, such as
when threads or forking is involved.
Test::Harness will accept either, but avoid mixing the two styles.
Defaults to on.
=cut
sub use_numbers {
my($self, $use_nums) = @_;
t/Test/Builder.pm view on Meta::CPAN
my $test_results = $self->{Test_Results};
if( @$test_results ) {
# The plan? We have no plan.
if( $self->{No_Plan} ) {
$self->_print("1..$self->{Curr_Test}\n") unless $self->no_header;
$self->{Expected_Tests} = $self->{Curr_Test};
}
# Auto-extended arrays and elements which aren't explicitly
# filled in with a shared reference will puke under 5.8.0
# ithreads. So we have to fill them in by hand. :(
my $empty_result = &share({});
for my $idx ( 0..$self->{Expected_Tests}-1 ) {
$test_results->[$idx] = $empty_result
unless defined $test_results->[$idx];
}
my $num_failed = grep !$_->{'ok'},
@{$test_results}[0..$self->{Curr_Test}-1];
my $num_extra = $self->{Curr_Test} - $self->{Expected_Tests};
t/Test/Builder.pm view on Meta::CPAN
0 all tests successful
255 test died or all passed but wrong # of tests run
any other number how many failed (including missing or extras)
If you fail more than 254 tests, it will be reported as 254.
=head1 THREADS
In perl 5.8.0 and later, Test::Builder is thread-safe. The test
number is shared amongst all threads. This means if one thread sets
the test number using current_test() they will all be effected.
Test::Builder is only thread-aware if threads.pm is loaded I<before>
Test::Builder.
=head1 EXAMPLES
CPAN can provide the best examples. Test::Simple, Test::More,
Test::Exception and Test::Differences all use Test::Builder.
=head1 SEE ALSO
Test::Simple, Test::More, Test::Harness
t/Test/More.pm view on Meta::CPAN
# There's faster ways to do this, but this is easiest.
local $^W = 0;
# It really doesn't matter how we sort them, as long as both arrays are
# sorted with the same algorithm.
#
# Ensure that references are not accidentally treated the same as a
# string containing the reference.
#
# Have to inline the sort routine due to a threading/sort bug.
# See [rt.cpan.org 6782]
#
# I don't know how references would be sorted so we just don't sort
# them. This means eq_set doesn't really work with refs.
return eq_array(
[grep(ref, @$a1), sort( grep(!ref, @$a1) )],
[grep(ref, @$a2), sort( grep(!ref, @$a2) )],
);
}
t/Test/More.pm view on Meta::CPAN
difference. This is good.
However, it does mean that functions like is_deeply() cannot be used to
test the internals of string overloaded objects. In this case I would
suggest Test::Deep which contains more flexible testing functions for
complex data structures.
=item Threads
Test::More will only be aware of threads if "use threads" has been done
I<before> Test::More is loaded. This is ok:
use threads;
use Test::More;
This may cause problems:
use Test::More
use threads;
=item Test::Harness upgrade
no_plan and todo depend on new Test::Harness features and fixes. If
you're going to distribute tests that use no_plan or todo your
end-users will have to upgrade Test::Harness to the latest one on
CPAN. If you avoid no_plan and TODO tests, the stock Test::Harness
will work fine.
( run in 0.502 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )