line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Build::Hopen::Base: common definitions for hopen. |
2
|
|
|
|
|
|
|
# Thanks to David Farrell, |
3
|
|
|
|
|
|
|
# https://www.perl.com/article/how-to-build-a-base-module/ |
4
|
|
|
|
|
|
|
# Copyright (c) 2018 Christopher White. All rights reserved. |
5
|
|
|
|
|
|
|
# LGPL 2.1+ - see the accompanying LICENSE file |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Build::Hopen::Base; |
8
|
16
|
|
|
16
|
|
1221401
|
use parent 'Exporter'; |
|
16
|
|
|
|
|
468
|
|
|
16
|
|
|
|
|
130
|
|
9
|
16
|
|
|
16
|
|
1491
|
use Import::Into; |
|
16
|
|
|
|
|
2704
|
|
|
16
|
|
|
|
|
532
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.000007'; # TRIAL |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# Pragmas |
14
|
16
|
|
|
16
|
|
405
|
use 5.014; |
|
16
|
|
|
|
|
75
|
|
15
|
16
|
|
|
16
|
|
115
|
use feature ":5.14"; |
|
16
|
|
|
|
|
30
|
|
|
16
|
|
|
|
|
2054
|
|
16
|
16
|
|
|
16
|
|
105
|
use strict; |
|
16
|
|
|
|
|
42
|
|
|
16
|
|
|
|
|
395
|
|
17
|
16
|
|
|
16
|
|
78
|
use warnings; |
|
16
|
|
|
|
|
27
|
|
|
16
|
|
|
|
|
627
|
|
18
|
|
|
|
|
|
|
require experimental; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Packages |
21
|
16
|
|
|
16
|
|
702
|
use Data::Dumper; |
|
16
|
|
|
|
|
6837
|
|
|
16
|
|
|
|
|
781
|
|
22
|
16
|
|
|
16
|
|
95
|
use Carp; |
|
16
|
|
|
|
|
40
|
|
|
16
|
|
|
|
|
1265
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Definitions from this file |
25
|
|
|
|
|
|
|
use constant { |
26
|
16
|
|
|
|
|
2846
|
true => !!1, |
27
|
|
|
|
|
|
|
false => !!0, |
28
|
16
|
|
|
16
|
|
111
|
}; |
|
16
|
|
|
|
|
49
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
our @EXPORT = qw(true false); |
31
|
|
|
|
|
|
|
#our @EXPORT_OK = qw(); |
32
|
|
|
|
|
|
|
#our %EXPORT_TAGS = ( |
33
|
|
|
|
|
|
|
# default => [@EXPORT], |
34
|
|
|
|
|
|
|
# all => [@EXPORT, @EXPORT_OK] |
35
|
|
|
|
|
|
|
#); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
#DEBUG |
38
|
|
|
|
|
|
|
BEGIN { |
39
|
16
|
50
|
|
16
|
|
2569
|
$SIG{'__DIE__'} = sub { Carp::confess(@_) } unless $SIG{'__DIE__'}; |
|
2
|
|
|
|
|
5312
|
|
40
|
|
|
|
|
|
|
#$Exporter::Verbose=1; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub import { |
44
|
133
|
|
|
133
|
|
31246
|
my $target = caller; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# Copy symbols listed in @EXPORT first, in case @_ gets trashed later. |
47
|
133
|
|
|
|
|
9175
|
Build::Hopen::Base->export_to_level(1, @_); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# Re-export pragmas |
50
|
133
|
|
|
|
|
1545
|
feature->import::into($target, qw(:5.14)); |
51
|
133
|
|
|
|
|
33498
|
"$_"->import::into($target) foreach qw(strict warnings); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# Re-export packages |
54
|
133
|
|
|
|
|
46220
|
Data::Dumper->import::into($target); |
55
|
133
|
|
|
|
|
24709
|
Carp->import::into($target, qw(carp croak confess)); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
# Permit smartmatch. |
58
|
|
|
|
|
|
|
# http://blogs.perl.org/users/mike_b/2013/06/a-little-nicer-way-to-use-smartmatch-on-perl-518.html |
59
|
|
|
|
|
|
|
# (Also, https://www.perlmonks.org/?node_id=1163370 is another approach.) |
60
|
133
|
|
|
|
|
24528
|
experimental->import::into($target, 'smartmatch'); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
} #import() |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
65
|
|
|
|
|
|
|
__END__ |