view release on metacpan or search on metacpan
eval "use DBD::SQLite";
plan skip_all => 'needs DBD::SQLite for testing' if $@;
}
sub import {
strict->import;
warnings->import;
utf8->import;
}
sub prepare_db {
view all matches for this distribution
view release on metacpan or search on metacpan
eval "use DBD::SQLite";
plan skip_all => 'needs DBD::SQLite for testing' if $@;
}
sub import {
strict->import;
warnings->import;
utf8->import;
}
sub prepare_db {
view all matches for this distribution
view release on metacpan or search on metacpan
eval "use DBD::SQLite";
plan skip_all => 'needs DBD::SQLite for testing' if $@;
}
sub import {
strict->import;
warnings->import;
utf8->import;
}
sub prepare_db {
view all matches for this distribution
view release on metacpan or search on metacpan
eval "use DBD::SQLite";
plan skip_all => 'needs DBD::SQLite for testing' if $@;
}
sub import {
strict->import;
warnings->import;
utf8->import;
}
sub prepare_db {
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/t/Utils.pm view on Meta::CPAN
use warnings;
use utf8;
use Test::More;
sub import {
strict->import;
warnings->import;
utf8->import;
}
sub prepare_db {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Arrow.pm view on Meta::CPAN
sub _import_option_no_strict {
my ($pkg, $args) = @_;
my $no_strict = delete $args->{no_strict} or delete $args->{'-strict'};
if (!$no_strict) {
strict->import;
}
}
sub _import_option_no_warnings {
my ($pkg, $args) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/t/Utils.pm view on Meta::CPAN
use utf8;
use Test::FailWarnings;
use Test::Name::FromLine;
sub import {
strict->import;
warnings->import;
utf8->import;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Class/Most.pm view on Meta::CPAN
my ( $class, %args ) = @_;
my $caller = caller;
eval "package $caller; use Test::Most;";
croak($@) if $@;
warnings->import;
strict->import;
if ( my $parent = delete $args{parent} ) {
if ( ref $parent && 'ARRAY' ne ref $parent ) {
croak(
"Argument to 'parent' must be a classname or array of classnames, not ($parent)"
);
view all matches for this distribution
view release on metacpan or search on metacpan
t/Test/abeltje.pm view on Meta::CPAN
sub import_extra {
# use Test::Warnings 'warnings' interferes
# with warnings->import()
warnings::import('warnings');
strict->import();
require feature;
feature->import(':5.10');
require lib;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/DBIC/DBDConnector.pm view on Meta::CPAN
=end override
=cut
sub import_extra {
strict->import;
warnings->import;
Test::Builder::Module->import;
}
=begin hide
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/DiagINC.pm view on Meta::CPAN
# to load them either. On the other hand we would like to know our
# code is at least somewhat ok. Therefore this madness ;)
BEGIN {
if ( $ENV{RELEASE_TESTING} ) {
require warnings && warnings->import;
require strict && strict->import;
}
}
sub _max_length {
my $max = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
use strict;
use warnings;
sub import {
strict->import;
warnings->import;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Kit.pm view on Meta::CPAN
# "this works because both pragmas set $^H (see perldoc perlvar) which
# affects the current compilation - i.e. the file who use'd us - which
# is why we don't need to do anything special to make it affect that
# file rather than this one (which is already compiled)"
#
# In the Moose code the author simply calls strict->import() in the
# appropriate import() method and that does the trick. For us working
# at a bit more of a distance we have to be a bit trickier - adding
# strict->import() or warnings->import() to the import method on the
# target class. We do that by wrapping it with Hook::LexWrap::wrap().
#
if ($Test::Builder::VERSION < 1.3 && ($package eq 'strict' || $package eq 'warnings')) {
wrap "${target}::import", post => sub { $package->import(); };
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Lite.pm view on Meta::CPAN
my ($class, @args) = @_;
my $pkg = caller(1);
for (@args) {
if ($_ eq ':strict') {
warnings->import;
strict->import;
}
}
$CLASS->_export_defs(qw/
is
ok
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Mini/Unit.pm view on Meta::CPAN
# @api private
sub import {
my ($class, @args) = @_;
my $caller = caller();
strict->import;
warnings->import;
Test::Mini::Unit::Sugar::Shared->import(into => $caller, @args);
Test::Mini::Unit::Sugar::TestCase->import(into => $caller, @args);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/ModuleVersion.pm view on Meta::CPAN
else {
push @{"${caller}::ISA"}, $class;
}
# strict!
strict->import;
warnings->import;
# Modern!
feature->import(':5.10') if $] >= 5.010;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/Helper.pm view on Meta::CPAN
sub import {
my $class = shift;
my $caller = caller;
strict->import;
warnings->import;
eval <<"HERE" or die $@;
package $caller;
use Test::More;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Most.pm view on Meta::CPAN
Test::Exception
Test::Deep
Test::Warn
/;
warnings->import;
strict->import;
eval "use Data::Dumper::Names 0.03";
$DATA_DUMPER_NAMES_INSTALLED = !$@;
if ( $ENV{BAIL_ON_FAIL} ) {
$bail_set = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test2/V0.pm view on Meta::CPAN
my $no_pragmas = delete $options{'-no_pragmas'};
my $no_strict = delete $options{'-no_strict'} || $no_pragmas;
my $no_warnings = delete $options{'-no_warnings'} || $no_pragmas;
my $no_utf8 = delete $options{'-no_utf8'} || $no_pragmas;
strict->import() unless $no_strict;
'warnings'->import() unless $no_warnings;
Test2::Plugin::UTF8->import() unless $no_utf8;
my $target = delete $options{'-target'};
Test2::Tools::Target->import_into($caller, $target)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Spec/Acceptance.pm view on Meta::CPAN
sub import {
my $class = shift;
my $callpkg = caller;
strict->import;
warnings->import;
if (@_) {
$class->export_to_level(1, $callpkg, @_);
return;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Spec.pm view on Meta::CPAN
sub import {
my $class = shift;
my $callpkg = caller;
strict->import;
warnings->import;
# specific imports requested
if (@_) {
$class->export_to_level(1, $callpkg, @_);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Stream/Bundle/V1.pm view on Meta::CPAN
use Test::Stream::Bundle qw/import/;
sub plugins {
return (
sub { strict->import(); warnings->import() },
qw{
IPC
TAP
ExitSummary
Core
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/t.pm view on Meta::CPAN
@EXPORT = @Test::Most::EXPORT;
sub import {
strict->import;
warnings->import;
my $no_plan = 1;
m/^(?:no_plan|defer_plan|tests|skip_all)$/ and undef $no_plan for @_;
splice @_, 1, 1, ( 'no_plan' ) if $no_plan;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test2/V0.pm view on Meta::CPAN
my $no_pragmas = delete $options{'-no_pragmas'};
my $no_strict = delete $options{'-no_strict'} || $no_pragmas;
my $no_warnings = delete $options{'-no_warnings'} || $no_pragmas;
my $no_utf8 = delete $options{'-no_utf8'} || $no_pragmas;
strict->import() unless $no_strict;
'warnings'->import() unless $no_warnings;
Test2::Plugin::UTF8->import() unless $no_utf8;
my $target = delete $options{'-target'};
Test2::Tools::Target->import_into($caller, $target)
view all matches for this distribution
view release on metacpan or search on metacpan
t/t_Common.pm view on Meta::CPAN
carp "Detected 'use/no warnings/strict' done before importing ",
__PACKAGE__, "\n(they might be un-done)\n"
if ($users_pragmas ne $default_pragmas
|| $users_warnbits ne $default_warnbits);
}
strict->import::into($target);
#warnings->import::into($target);
warnings->import::into($target, FATAL => 'all'); # blowing up a test is ok
#As of perl 5.39.8 multiple 'use' specifying Perl version is deprecated
#use 5.010; # say, state
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Thorium/Protection.pm view on Meta::CPAN
use strict;
use warnings;
sub import {
strict->import();
warnings->import();
require utf8;
utf8->import();
view all matches for this distribution
view release on metacpan or search on metacpan
t/boilerplate.pm view on Meta::CPAN
use Test::Requires { version => 0.88 };
use version; our $VERSION = qv( '0.3' );
sub import {
strict->import;
$] < 5.008 ? warnings->import : warnings->import( NONFATAL => 'all' );
return;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Util/Any.pm view on Meta::CPAN
=head2 DO SOMETHING WITHOUT EXPORTING ANYTHING
-strict => [
[ 'strict' => {
'.' => sub {
strict->import();
warnings->import();
},
}
];
view all matches for this distribution
view release on metacpan or search on metacpan
t/Test/abeltje.pm view on Meta::CPAN
sub import_extra {
# use Test::Warnings 'warnings' interferes
# with warnings->import()
warnings::import ("warnings");
strict->import ();
require feature;
feature->import (":5.10");
require lib;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Validation/Class.pm view on Meta::CPAN
sub import {
my $caller = caller(0) || caller(1);
strict->import;
warnings->import;
__PACKAGE__->export_to_level(1, @_);
return return_class_proto $caller # provision prototype when used
view all matches for this distribution