blib/lib/Importer/Zim/Lexical.pm

filter: Statementstmt 92.3% 24 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 1 totaltotal 88.5% 31 / 35 SCAR 0.0
CC
1
Cov
92%
export_to
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Build ↑ Summary
1  
2 package Importer::Zim::Lexical;
3 2 $Importer::Zim::Lexical::VERSION = '0.9.0';
4 # ABSTRACT: Import functions as lexical subroutines
5  
6 2 ▶use 5.018;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Importer::Zim::Base 0.8.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶BEGIN { our @ISA = qw(Importer::Zim::Base); }
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶use Sub::Inject 0.2.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use Importer::Zim::Utils 0.8.0 qw(DEBUG carp);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 sub import {
15 3 ▶ my $class = shift;
Subroutine import: called CC=1 SCAR=0.0
16  
17 3 carp "$class->import(@_)" if DEBUG;
18 3 my @exports = $class->_prepare_args(@_);
19  
20 3 @_ = map { @{$_}{qw(export code)} } @exports;
21 3 goto &Sub::Inject::sub_inject;
22 }
23  
24 sub export_to {
25 0 ▶ shift;
Subroutine export_to: not called CC=1 SCAR=6.9
Pod undocumented
26 0 goto &Sub::Inject::sub_inject;
27 }
28  
29 2 ▶no Importer::Zim::Utils qw(DEBUG carp);
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 2 1;
32  
33 #pod =encoding utf8
34 #pod
35 #pod =head1 SYNOPSIS
36 #pod
37 #pod use Importer::Zim::Lexical 'Scalar::Util' => 'blessed';
38 #pod use Importer::Zim::Lexical 'Scalar::Util' =>
39 #pod ( 'blessed' => { -as => 'typeof' } );
40 #pod
41 #pod use Importer::Zim::Lexical 'Mango::BSON' => ':bson';
42 #pod
43 #pod use Importer::Zim::Lexical 'Foo' => { -version => '3.0' } => 'foo';
44 #pod
45 #pod use Importer::Zim::Lexical 'Krazy::Taco' => qw(tacos burritos poop);
46 #pod
47 #pod =head1 DESCRIPTION
48 #pod
49 #pod "It's... INCREDIBLE! There's stuff down here I've never even
50 #pod dreamed of! I'm gonna try to blow it up."
51 #pod – Dib
52 #pod
53 #pod This is a backend for L<Importer::Zim> which gives lexical scope
54 #pod to imported subroutines.
55 #pod
56 #pod =head1 DEBUGGING
57 #pod
58 #pod You can set the C<IMPORTER_ZIM_DEBUG> environment variable
59 #pod for get some diagnostics information printed to C<STDERR>.
60 #pod
61 #pod IMPORTER_ZIM_DEBUG=1
62 #pod
63 #pod =head1 SEE ALSO
64 #pod
65 #pod L<Importer::Zim>
66 #pod
67 #pod =cut
68  
69 __END__
« Build ↑ Summary