blib/lib/DBIO/Test/ErrorComponent.pm

filter: Statementstmt 100% 8 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 10 / 10 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/DBIO/Test/DynamicForeignCols/Computer.pm ↑ Summary blib/lib/DBIO/Test/FakeComponent.pm »
1 # belongs to t/run/90ensure_class_loaded.tl
2 package DBIO::Test::ErrorComponent;
3 # ABSTRACT: Test component that fails to load due to missing true value
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 our $VERSION = '0.900007';
7  
8 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 # DO NOT "FIX" THIS TO 1 — and do not delete it.
11 #
12 # This fixture exists to make load_optional_class() die with Perl's
13 # "did not return a true value" error (t/90ensure_class_loaded.t). Perl emits
14 # that same error both for a module with no trailing true value and for one
15 # that explicitly returns false, so returning 0 here is what the test needs.
16 #
17 # The explicit 0 is also load-bearing against version sweeps: without a final
18 # statement, whatever the sweep stamps last — e.g. our $VERSION = '...' —
19 # becomes the file's return value, which is TRUE, the module loads cleanly and
20 # the test silently breaks. Keep this 0 as the last statement in the file.
21 3 0;
22  
23 __END__
« blib/lib/DBIO/Test/DynamicForeignCols/Computer.pm ↑ Summary blib/lib/DBIO/Test/FakeComponent.pm »