lib/FP/Repl/Dependencies.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/FP/List/t.pm ↑ Summary lib/FP/Repl/corefuncs.pm »
1 #
2 # Copyright (c) 2015 Christian Jaeger, copying@christianjaeger.ch
3 #
4 # This is free software, offered under either the same terms as perl 5
5 # or the terms of the Artistic License version 2 or the terms of the
6 # MIT License (Expat version). See the file COPYING.md that came
7 # bundled with this file.
8 #
9  
10 =head1 NAME
11  
12 FP::Repl::Dependencies - hack to load Repl dependencies
13  
14 =head1 SYNOPSIS
15  
16 use Chj::TEST use => 'FP::Repl::Dependencies';
17  
18 =head1 DESCRIPTION
19  
20 Term::ReadLine::Gnu does not allow to check for its presence
21 directly. When require'ing Term::ReadLine::Gnu, it gives an error
22 saying "It is invalid to load Term::ReadLine::Gnu directly.". That
23 makes it appear as unloadable when in fact it is present. And
24 depending on just Term::ReadLine is not enough, the repl will then
25 fail at runtime. Stupid.
26  
27 So, this.
28  
29 =head1 NOTE
30  
31 This is alpha software! Read the status section in the package README
32 or on the L<website|http://functional-perl.org/>.
33  
34 =cut
35  
36 package FP::Repl::Dependencies;
37  
38 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
39 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
40 6 ▶use warnings FATAL => 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
41  
42 6 ▶use Term::ReadLine;
Subroutine BEGIN: called CC=1 SCAR=0.0
43  
44 $Term::ReadLine::Gnu::VERSION
45 or die "dependency Term::ReadLine::Gnu not present";
46  
47 # now also depend on PadWalker etc.
48 require FP::Repl::Repl;
49  
50 1
« lib/FP/List/t.pm ↑ Summary lib/FP/Repl/corefuncs.pm »