lib/TUI/Objects/Const.pm

filter: Statementstmt 94.4% 34 / 36 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 95.4% 42 / 44 CC 1 SCAR 0.0
CC
1
Cov
94%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/TUI/StdDlg/FindFirstRec.pm ↑ Summary lib/TUI/Gadgets/LineCollection.pm »
1 package TUI::Objects::Const;
2 # ABSTRACT: Constants for object and collection components
3
4 53 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 53 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 53 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7
8 53 our $VERSION = '2.000003';
9 53 $VERSION =~ tr/_//d;
10 53 our $AUTHORITY = 'cpan:BRICKPOOL';
11
12 53 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 53 our @EXPORT_OK = qw(
14 ccNotFound
15 maxCollectionSize
16 );
17
18 53 our %EXPORT_TAGS = (
19 );
20
21 # add all the other %EXPORT_TAGS ":class" tags to the ":all" class and
22 # @EXPORT_OK, deleting duplicates
23 {
24 53 my %seen;
25 push
26 @EXPORT_OK,
27 0 grep {!$seen{$_}++} @{$EXPORT_TAGS{$_}}
28 53 foreach keys %EXPORT_TAGS;
29 push
30 53 @{$EXPORT_TAGS{all}},
31 @EXPORT_OK;
32 }
33
34 53 ▶use Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
35 53 ▶use TUI::Const qw( UINT_MAX );
Subroutine BEGIN: called CC=1 SCAR=0.0
36
37 53 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
38 53 ccNotFound => -1
39 53 };
40
41 # The calculation of 'maxCollectionSize' uses the size of a pointer to
42 # determine the maximum number of elements in the collection.
43 53 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
44 53 maxCollectionSize => int( ( UINT_MAX - 16 ) / $Config{ptrsize} ),
45 53 };
46
47 53 1
48
49 __END__
« lib/TUI/StdDlg/FindFirstRec.pm ↑ Summary lib/TUI/Gadgets/LineCollection.pm »