line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- coding: utf-8 -*- |
2
|
|
|
|
|
|
|
package Devel::Stub::lib; |
3
|
|
|
|
|
|
|
|
4
|
6
|
|
|
6
|
|
164792
|
use warnings; |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
213
|
|
5
|
6
|
|
|
6
|
|
29
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
160
|
|
6
|
6
|
|
|
6
|
|
28
|
use Carp; |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
1384
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub import { |
9
|
6
|
|
|
6
|
|
44
|
my $class = shift; |
10
|
6
|
|
|
|
|
18
|
my %params = @_; |
11
|
6
|
|
100
|
|
|
46
|
my $active_if = $params{active_if} || $ENV{STUB}; |
12
|
6
|
|
100
|
|
|
30
|
my $stubpath = $params{path} || "stub"; |
13
|
6
|
|
|
|
|
10
|
my $quiet = $params{quiet}; |
14
|
|
|
|
|
|
|
|
15
|
6
|
100
|
|
|
|
57
|
if ($active_if){ |
16
|
4
|
50
|
|
|
|
27
|
unshift @INC,$stubpath if $INC[0] ne $stubpath; |
17
|
4
|
100
|
|
|
|
1808
|
print STDERR __PACKAGE__," - path '$stubpath' have been added to \@INC\n" unless $quiet; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
__END__ |