Mite
view release on metacpan or search on metacpan
lib/Mite/Shim.pm view on Meta::CPAN
sub _is_compiling {
return $ENV{MITE_COMPILE} ? 1 : 0;
}
sub import {
my $class = shift;
my($caller, $file) = caller;
# Turn on warnings and strict in the caller
warnings->import;
strict->import;
if( _is_compiling() ) {
require Mite::Project;
Mite::Project->default->inject_mite_functions(
package => $caller,
file => $file,
);
}
else {
# Work around Test::Compile's tendency to 'use' modules.
t/lib/Test/Mite.pm view on Meta::CPAN
use feature ':5.10';
use strict;
use warnings;
use parent 'Fennec';
use Path::Tiny;
# func, not a method, to avoid altering @_
sub import {
# Turn on strict, warnings and 5.10 features
strict->import;
warnings->import;
require feature;
feature->import(":5.10");
# Make everything in @INC absolute so we can chdir in tests
@INC = map { path($_)->absolute->stringify } @INC;
#push @_, test_sort => 'ordered';
goto &Fennec::import;
}
( run in 0.309 second using v1.01-cache-2.11-cpan-299005ec8e3 )