view release on metacpan or search on metacpan
local/lib/perl5/Moo.pm view on Meta::CPAN
sub import {
my $target = caller;
my $class = shift;
_set_loaded(caller);
strict->import;
warnings->import;
if ($INC{'Role/Tiny.pm'} and Role::Tiny->is_role($target)) {
croak "Cannot import Moo into a role";
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/mite/lib/Local/Mite.pm view on Meta::CPAN
my ( $class, $kind ) = @_;
my ( $caller, $file ) = caller;
# Turn on warnings and strict in the caller
warnings->import;
strict->import;
$kind ||= 'class';
$kind = ( $kind =~ /role/i ) ? 'role' : 'class';
if( _is_compiling() ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Role/Tiny.pm view on Meta::CPAN
}
sub import {
my $target = caller;
my $me = shift;
strict->import;
warnings->import;
$me->init_role($target, @_);
}
sub init_role {
view all matches for this distribution
view release on metacpan or search on metacpan
else {
$code->();
}
}
}
strict->import;
warnings->import;
utf8->import;
}
sub get_file_contents {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Scalar/Random/PP/OO.pm view on Meta::CPAN
# it must be "require", because Scalar::Random::PP::OO::Util depends on Scalar::Random::PP::OO::Exporter,
# which depends on Scalar::Random::PP::OO::Util::import()
require Scalar::Random::PP::OO::Util;
sub import{
# strict->import;
$^H |= $strict_bits;
# warnings->import('all', FATAL => 'recursion');
${^WARNING_BITS} |= $warnings::Bits{all};
${^WARNING_BITS} |= $warnings_extra_bits;
return;
lib/Scalar/Random/PP/OO.pm view on Meta::CPAN
else{
push @exports, $arg;
}
}
# strict->import;
$^H |= $strict_bits;
# warnings->import('all', FATAL => 'recursion');
${^WARNING_BITS} |= $warnings::Bits{all};
${^WARNING_BITS} |= $warnings_extra_bits;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Shell/Tools.pm view on Meta::CPAN
our @EXPORT = (); ## no critic (ProhibitAutomaticExportation)
our %EXPORT_TAGS = ();
sub import { ## no critic (RequireArgUnpacking)
warnings->import;
strict->import;
__PACKAGE__->export_to_level(1, @_);
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Sietima/Policy.pm view on Meta::CPAN
sub import {
# These affect the currently compiling scope,
# so no need for import::into
strict->import;
warnings->import;
feature->import(':5.36');
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
use strict;
use warnings;
use utf8;
sub import {
strict->import;
warnings->import;
utf8->import;
}
1;
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/Class/LOP.pm view on Meta::CPAN
}
sub warnings_strict {
my $self = shift;
warnings->import();
strict->import();
return $self;
}
sub getscope {
my ($self) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Sympatic.pm view on Meta::CPAN
sub import {
my $to = caller;
English->import::into($to, qw< -no_match_vars >);
feature->import::into($to,qw< say >);
strict->import::into($to);
warnings->import::into($to);
Function::Parameters->import::into($to);
utf8::all->import::into($to);
# see https://github.com/pjf/autodie/commit/6ff9ff2b463af3083a02a7b5a2d727b8a224b970
view all matches for this distribution
view release on metacpan or search on metacpan
lib/TAEB/Test.pm view on Meta::CPAN
our @EXPORT = qw/test_items test_monsters degrade_ok degrade_nok degrade_progression plan_tests/;
sub import_extra {
Test::More->export_to_level(2);
strict->import;
warnings->import;
}
=head2 test_items ITEM_LIST
view all matches for this distribution
view release on metacpan or search on metacpan
lib/TUI/toolkit/UO/Antlers.pm view on Meta::CPAN
# Prevent double init per compilation unit
return if $^H{ __PACKAGE__ . "/$caller" };
$^H{ __PACKAGE__ . "/$caller" } = 1;
# Turn on strict/warnings for caller
strict->import;
warnings->import;
# When exporting 'extends', we assume that a class hierarchy exists and
# inject the base class if the class in the hierarchy has no parent
my $exports = Importer->get( $class, @imports );
view all matches for this distribution
view release on metacpan or search on metacpan
t/TRTest.pm view on Meta::CPAN
sub import
{
my ($class) = @_;
strict->import ();
utf8->import ();
warnings->import ();
# We already had to do this to use this module.
# FindBin->import ('$Bin');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tak/STDIONode.pm view on Meta::CPAN
sub import {
my $target = caller;
my $class = shift;
_set_loaded(caller);
strict->import;
warnings->import;
if ($INC{'Role/Tiny.pm'} and Role::Tiny->is_role($target)) {
die "Cannot import Moo into a role";
}
lib/Tak/STDIONode.pm view on Meta::CPAN
sub import {
my $target = caller;
my ($me) = @_;
_set_loaded(caller);
strict->import;
warnings->import;
if ($Moo::MAKERS{$target} and $Moo::MAKERS{$target}{is_class}) {
die "Cannot import Moo::Role into a Moo class";
}
$INFO{$target} ||= {};
lib/Tak/STDIONode.pm view on Meta::CPAN
strictures->VERSION(2);
@_ = ('strictures');
goto &strictures::import;
}
else {
strict->import;
warnings->import;
}
}
1;
lib/Tak/STDIONode.pm view on Meta::CPAN
$class->$method($opts);
}
sub _enable_1 {
my ($class, $opts) = @_;
strict->import;
warnings->import(FATAL => 'all');
if (_want_extra($opts->{file})) {
_load_extras(qw(indirect multidimensional bareword::filehandles));
indirect->unimport(':fatal')
lib/Tak/STDIONode.pm view on Meta::CPAN
'once' # triggers inconsistently, can't be fatalized
);
sub _enable_2 {
my ($class, $opts) = @_;
strict->import;
warnings->import;
warnings->import(FATAL => @WARNING_CATEGORIES);
warnings->unimport(FATAL => @V2_NONFATAL);
warnings->import(@V2_NONFATAL);
warnings->unimport(@V2_DISABLE);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/rjbs.pm view on Meta::CPAN
use feature ();
use experimental ();
sub import {
strict->import;
warnings->import;
feature->import(':5.20');
experimental->import(qw( signatures postderef lexical_subs ));
$] >= 5.022000 && experimental->import(qw( bitwise refaliasing ));
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
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