| 1 | |||||||||||||||||||||||||||||
| 2 | package Importer::Zim::Bogus; | ||||||||||||||||||||||||||||
| 3 | 1 | $Importer::Zim::Bogus::VERSION = '0.12.0'; | |||||||||||||||||||||||||||
| 4 | # ABSTRACT: Bogus Importer::Zim backend | ||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use 5.010001; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use Importer::Zim::Utils qw(DEBUG carp); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | sub import { | ||||||||||||||||||||||||||||
| 11 | 0 | ▶ | require Importer::Zim::Base; | ||||||||||||||||||||||||||
|
Subroutine
import: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 12 | 0 | goto &Importer::Zim::Base::import_into; | |||||||||||||||||||||||||||
| 13 | } | ||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | sub export_to { | ||||||||||||||||||||||||||||
| 16 | 0 | ▶ | my $t = shift; | ||||||||||||||||||||||||||
|
Subroutine
export_to: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 17 | 0 | ▶ | @_ = %{ $_[0] } if @_ == 1 && ref $_[0] eq 'HASH'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
@_ == 1 and ref $_[0] eq "HASH"
MC/DC0%0/2
@_ == 1 and ref $_[0] eq "HASH"
@_ == 1
ref $_[0] eq "HASH"
Truth table0%0/3
A and B
A= @_ == 1B= ref $_[0] eq "HASH"
| |||||||||||||||||||||||||||||
| 18 | 0 | ▶ | @_ = map { $_ & 1 ? $_[$_] : "${t}::$_[$_]" } 0 .. $#_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 19 | 0 | goto &_export_to; | |||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | sub _export_to { | ||||||||||||||||||||||||||||
| 23 | 0 | ▶ | my %imports = @_; | ||||||||||||||||||||||||||
|
Subroutine
_export_to: not called CC=2 SCAR=10.1
| |||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 0 | carp | |||||||||||||||||||||||||||
| 26 | qq{WARNING! Using bogus Importer::Zim backend (you may need to install a proper backend)}; | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 1 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 29 | 0 | for ( keys %imports ) { | |||||||||||||||||||||||||||
| 30 | 0 | *$_ = $imports{$_}; | |||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 1 | ▶ | no Importer::Zim::Utils qw(DEBUG carp); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 1 | 1; | |||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | #pod =encoding utf8 | ||||||||||||||||||||||||||||
| 39 | #pod | ||||||||||||||||||||||||||||
| 40 | #pod =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 41 | #pod | ||||||||||||||||||||||||||||
| 42 | #pod use Importer::Zim::Bogus 'Scalar::Util' => 'blessed'; | ||||||||||||||||||||||||||||
| 43 | #pod use Importer::Zim::Bogus 'Scalar::Util' => | ||||||||||||||||||||||||||||
| 44 | #pod ( 'blessed' => { -as => 'typeof' } ); | ||||||||||||||||||||||||||||
| 45 | #pod | ||||||||||||||||||||||||||||
| 46 | #pod use Importer::Zim::Bogus 'Mango::BSON' => ':bson'; | ||||||||||||||||||||||||||||
| 47 | #pod | ||||||||||||||||||||||||||||
| 48 | #pod use Importer::Zim::Bogus 'Foo' => { -version => '3.0' } => 'foo'; | ||||||||||||||||||||||||||||
| 49 | #pod | ||||||||||||||||||||||||||||
| 50 | #pod use Importer::Zim::Bogus 'Krazy::Taco' => qw(tacos burritos poop); | ||||||||||||||||||||||||||||
| 51 | #pod | ||||||||||||||||||||||||||||
| 52 | #pod =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 53 | #pod | ||||||||||||||||||||||||||||
| 54 | #pod "Is it supposed to be stupid?" | ||||||||||||||||||||||||||||
| 55 | #pod – Zim | ||||||||||||||||||||||||||||
| 56 | #pod | ||||||||||||||||||||||||||||
| 57 | #pod This is a fallback backend for L<Importer::Zim>. | ||||||||||||||||||||||||||||
| 58 | #pod Only used when you have no installed legit backend. | ||||||||||||||||||||||||||||
| 59 | #pod It does no cleaning at all – so it is a polluting module such | ||||||||||||||||||||||||||||
| 60 | #pod as the regular L<Exporter>. | ||||||||||||||||||||||||||||
| 61 | #pod | ||||||||||||||||||||||||||||
| 62 | #pod The reason it exists is to provide a "working" L<Importer::Zim> | ||||||||||||||||||||||||||||
| 63 | #pod after installing L<Importer::Zim> and its nominal dependencies. | ||||||||||||||||||||||||||||
| 64 | #pod It will annoy you with warnings until a proper backend is installed. | ||||||||||||||||||||||||||||
| 65 | #pod | ||||||||||||||||||||||||||||
| 66 | #pod =head1 DEBUGGING | ||||||||||||||||||||||||||||
| 67 | #pod | ||||||||||||||||||||||||||||
| 68 | #pod You can set the C<IMPORTER_ZIM_DEBUG> environment variable | ||||||||||||||||||||||||||||
| 69 | #pod for get some diagnostics information printed to C<STDERR>. | ||||||||||||||||||||||||||||
| 70 | #pod | ||||||||||||||||||||||||||||
| 71 | #pod IMPORTER_ZIM_DEBUG=1 | ||||||||||||||||||||||||||||
| 72 | #pod | ||||||||||||||||||||||||||||
| 73 | #pod =head1 SEE ALSO | ||||||||||||||||||||||||||||
| 74 | #pod | ||||||||||||||||||||||||||||
| 75 | #pod L<Importer::Zim> | ||||||||||||||||||||||||||||
| 76 | #pod | ||||||||||||||||||||||||||||
| 77 | #pod =cut | ||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | __END__ | ||||||||||||||||||||||||||||