Conveyor/Environment_TEST.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Conveyor/Charset/ViaHash/LatinSmallLetters_TEST.pm ↑ Summary Conveyor/Exception.pm »
1 1 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Data::Conveyor::Environment_TEST;
6 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 $Data::Conveyor::Environment_TEST::VERSION = '1.103130';
8 }
9 # ABSTRACT: Stage-based conveyor-belt-like ticket handling system
10  
11 1 ▶use Error::Hierarchy::Test 'throws2_ok';
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use parent 'Data::Conveyor::Test';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 use constant PLAN => 1;
14  
15 sub run {
16 my $self = shift;
17 $self->SUPER::run(@_);
18 my $env = $self->make_real_object;
19 throws2_ok { $env->make_stage_object('foobar'); }
20 'Error::Hierarchy::Internal::ValueUndefined',
21 qr/no stage class name found for \[foobar\]/,
22 'make a stage object for a nonexistent stage';
23  
24 # We release the cache for stage class names here. The bug which prompted
25 # this is a bit involved. We ran all inline pod tests - via
26 # 00podtests.t -, and this test ran first, so $env was of ref
27 # Data::Conveyor::Environment. The above code calls
28 # make_stage_object(), which indirectly caches the stage class name
29 # results, so only ST_TXSEL is cached - since that's the only thing
30 # defined in the environment's STAGE_CLASS_NAME_HASH().
31 #
32 # The next test (from another pod test file) used the config file
33 # mechanism, which pointed to a config file from a different package,
34 # and that config file uses a different environment. However, the
35 # settings from that environment weren't seen because of the cached.
36 $env->release_stage_class_name_hash;
37 }
38 1;
39  
40  
41 __END__
« Conveyor/Charset/ViaHash/LatinSmallLetters_TEST.pm ↑ Summary Conveyor/Exception.pm »