view release on metacpan or search on metacpan
lib/Exporter/Extensible.pm view on Meta::CPAN
}
sub exporter_setup {
my ($self, $version)= @_;
push @{$self->{into}.'::ISA'}, ref($self);
strict->import;
warnings->import;
if ($version == 1) {
# Declare 'our %EXPORT'
*{$self->{into}.'::EXPORT'}= \%{$self->{into}.'::EXPORT'};
# Make @EXPORT and $EXPORT_TAGS{default} be the same arrayref.
lib/Exporter/Extensible.pm view on Meta::CPAN
export(qw( foo $x @STUFF -strict_and_warnings ), ':baz' => ['foo'] );
sub foo { ... }
sub strict_and_warnings {
strict->import;
warnings->import;
}
Create a new module which exports all that, and more
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Exporter/Handy.pm view on Meta::CPAN
# PRAGMATA
# Remember: Pragmas effect the current compilation context.
# No need to keep track of where we are importing into...
# They require their ->import() method to be called directly, no matter how deep the call stack happens to be.
# Just call ->import() directly, like below, and it will do the right thing.
sub strict : Export(-) { strict->import }
sub warnings : Export(-) { warnings->import }
sub utf8 : Export(-) { utf8->import }
sub strictures : Export(-) {
strict->import;
warnings->import
}
sub sane : Export(-) {
utf8->import;
strict->import;
warnings->import;
}
# use Exporter::Handy qw(-sane -features), exporter_setup => 1;
sub features {
lib/Exporter/Handy.pm view on Meta::CPAN
export(qw( foo $x @STUFF -strict_and_warnings ), ':baz' => ['foo'] );
sub foo { ... }
sub strict_and_warnings {
strict->import;
warnings->import;
}
Create a new module which exports all that, and more
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
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
script/rsybak view on Meta::CPAN
#}
#
#sub import {
# my $target = caller;
# my $me = shift;
# strict->import;
# warnings->import;
# $me->_install_subs($target);
# return if $me->is_role($target);
# $INFO{$target}{is_role} = 1;
# my $stash = _getstash($target);
view all matches for this distribution
view release on metacpan or search on metacpan
our @EXPORT = qw/test_fork parent child/;
sub import {
my $class = shift;
$class->export_to_level(1, @_);
strict->import;
warnings->import;
utf8->import;
Test::More->import;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FormValidator/Lite/Constraint.pm view on Meta::CPAN
package FormValidator::Lite::Constraint;
use strict;
use warnings;
sub import {
strict->import;
warnings->import;
no strict 'refs';
my $pkg = caller(0);
*{"$pkg\::rule"} = \&rule;
lib/FormValidator/Lite/Constraint.pm view on Meta::CPAN
=head1 DESCRIPTION
This module provides some utility classes for writing constraint rules declaratively.
This module enables strict->import and warnings->import automatically.
=head1 FUNCTIONS
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Full/Pragmata.pm view on Meta::CPAN
my $pkg = $args{target} // caller(0);
my $class = __PACKAGE__;
# Apply core syntax and rules
strict->import;
warnings->import;
utf8->import;
# We want mostly the 5.36 featureset, but since that includes `say` and `switch`
# we need to customise the list somewhat
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gapp/Actions.pm view on Meta::CPAN
sub import {
my ($class, %args) = @_;
my $callee = caller;
strict->import;
warnings->import;
# inject base class into new library
{ no strict 'refs';
unshift @{ $callee . '::ISA' }, 'Gapp::Actions::Base';
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/TestGitalist.pm view on Meta::CPAN
contenttype_is
/);
sub import {
my $into = caller();
strict->import;
warnings->import;
goto \&Exporter::import;
}
use constant ();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gloom.pm view on Meta::CPAN
sub import {
my ($class, $flag) = @_;
my ($package, $module) = caller(0);
strict->import;
warnings->import;
if ($class->isa(__PACKAGE__) and
defined $flag and
$flag eq '-base'
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/GrpcClient.pm view on Meta::CPAN
1;
} or do {
Test::More->import(skip_all => 'Grpc::XS not available');
};
strict->import;
warnings->import;
# for libgrpc
delete @ENV{grep /https?_proxy/i, keys %ENV};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Graphics/Grid/Setup.pm view on Meta::CPAN
sub _import_tag {
my ( $class, $target, $tag ) = @_;
if ( $tag eq ':base' ) {
strict->import::into($target);
warnings->import::into($target);
utf8->import::into($target);
feature->import::into( $target, ':5.14' );
Carp->import::into($target);
view all matches for this distribution
view release on metacpan or search on metacpan
sub import
{
my ($class) = @_;
strict->import ();
utf8->import ();
warnings->import ();
Test::More->import ();
Gzip::Zopfli->import (':all');
GZT->export_to_level (1);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/Blitz/pragma.pm view on Meta::CPAN
method import($class: @items) {
for my $item (@items) {
Carp::croak qq("$item" is not exported by the $class module);
}
strict->import;
warnings->import(qw(all FATAL uninitialized));
warnings->unimport(qw(experimental::postderef)) unless _HAVE_PERL_5_24;
feature->import(':' . PERL_VERSION, 'postderef');
feature->unimport('indirect') if _HAVE_PERL_5_32;
Function::Parameters->import;
view all matches for this distribution
view release on metacpan or search on metacpan
our @EXPORT = qw/is is_deeply is_xml slurp mktree isxml/;
our $VERSION = '0.001'; # Exporter needs a $VERSION
sub import {
my ($self, @args) = @_;
strict->import;
warnings->import;
Test::More->import(@args);
$self->export_to_level(1, $self);
}
view all matches for this distribution
view release on metacpan or search on metacpan
sub import
{
my ($class) = @_;
strict->import ();
utf8->import ();
warnings->import ();
Test::More->import ();
HTML::Make->import ();
HMT->export_to_level (1);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Engine/Middleware.pm view on Meta::CPAN
my($class, ) = @_;
my $caller = caller;
return unless $caller =~ /(?:\:)?Middleware\:\:.+/;
strict->import;
warnings->import;
init_class($caller);
any_moose()->import({ into_level => 1 });
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Engine/Interface.pm view on Meta::CPAN
*{"$caller\::__INTERFACE__"} = sub {
my $caller = caller(0);
__INTERFACE__($caller);
};
strict->import;
warnings->import;
init_class($caller);
any_moose()->import({into_level => 1});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Session/State/Base.pm view on Meta::CPAN
use warnings;
use Class::Accessor::Fast;
sub import {
my $pkg = caller(0);
strict->import;
warnings->import;
no strict 'refs';
unshift @{"${pkg}::ISA"}, "Class::Accessor::Fast";
$pkg->mk_ro_accessors(qw/permissive/);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/IM/Engine.pm view on Meta::CPAN
use IM::Engine;
use base 'Test::More';
sub import_extra {
Test::More->export_to_level(2);
strict->import;
warnings->import;
my $caller = caller(1);
my $engine = IM::Engine->new(
interface => {
view all matches for this distribution
view release on metacpan or search on metacpan
t/io_linenum.t view on Meta::CPAN
my $File;
BEGIN {
$File = __FILE__;
require strict; strict->import();
}
use Test::More tests => 12;
use IO::File;
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
t/IPNGDT.pm view on Meta::CPAN
binmode STDOUT, ":encoding(utf8)";
binmode STDERR, ":encoding(utf8)";
sub import
{
strict->import ();
utf8->import ();
warnings->import ();
Test::More->import ();
Image::PNG::Const->import (':all');
view all matches for this distribution
view release on metacpan or search on metacpan
t/IPNGLT.pm view on Meta::CPAN
sub import
{
my ($class) = @_;
strict->import ();
utf8->import ();
warnings->import ();
Test::More->import ();
Image::PNG::Libpng->import (':all');
Image::PNG::Const->import (':all');
view all matches for this distribution
view release on metacpan or search on metacpan
unless (grep { $_ eq 'jpeg' } Imager->read_types) {
plan skip_all => 'this test required jpeg support at Imager';
}
}
strict->import;
warnings->import;
for my $name (qw/ is_rotated path_to slurp /) {
no strict 'refs';
*{"$caller\::$name"} = \&{$name};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Import/Into.pm view on Meta::CPAN
}
doesn't do what you wanted, but
sub import {
strict->import;
}
will apply L<strict> to the calling file correctly.
Of course, now you have two new problems - first, that you still need to
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JBD/Core/stern.pm view on Meta::CPAN
no strict 'refs';
my $depth = shift || 0;
*{(caller($depth))[0] ."::$_"} = *$_ for qw(puke barf);
warnings->import;
strict->import;
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JCM/Boilerplate.pm view on Meta::CPAN
sub import ( $self, $type = 'script' ) {
### assert: ($type =~ m/^(?:class|role|script)$/ms)
my $target = caller;
strict->import::into($target);
warnings->import::into($target);
autodie->import::into($target);
feature->import::into( $target, ':5.22' );
view all matches for this distribution
view release on metacpan or search on metacpan
Class::Load::try_load_class('DBD::SQLite')
or plan skip_all => 'needs DBD::SQLite for testing'
}
sub import {
strict->import;
warnings->import;
utf8->import;
}
sub setup_dbh {
view all matches for this distribution