lib/TUI/MsgBox/Const.pm

filter: Statementstmt 100% 36 / 36 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 100% 44 / 44 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/TUI/Menus/Const.pm ↑ Summary lib/TUI/Objects/Collection.pm »
1 package TUI::MsgBox::Const;
2 # ABSTRACT: constants for message box dialogs
3
4 20 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 20 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 20 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7
8 20 our $VERSION = '2.000002';
9 20 $VERSION =~ tr/_//d;
10 20 our $AUTHORITY = 'cpan:BRICKPOOL';
11
12 20 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
13
14 20 our @EXPORT_OK = qw(
15 );
16
17 20 our %EXPORT_TAGS = (
18
19 mfXXXX => [qw(
20 mfWarning
21 mfError
22 mfInformation
23 mfConfirmation
24
25 mfYesButton
26 mfNoButton
27 mfOKButton
28 mfCancelButton
29
30 mfYesNoCancel
31 mfOKCancel
32 )],
33
34 );
35
36 # add all the other %EXPORT_TAGS ":class" tags to the ":all" class and
37 # @EXPORT_OK, deleting duplicates
38 {
39 20 my %seen;
40 push
41 @EXPORT_OK,
42 200 grep {!$seen{$_}++} @{$EXPORT_TAGS{$_}}
43 20 foreach keys %EXPORT_TAGS;
44 push
45 20 @{$EXPORT_TAGS{all}},
46 @EXPORT_OK;
47 }
48
49 # Message box classes
50
51 20 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
52 20 mfWarning => 0x0000, # Display a Warning box
53 mfError => 0x0001, # Display a Error box
54 mfInformation => 0x0002, # Display an Information Box
55 mfConfirmation => 0x0003, # Display a Confirmation Box
56 20 };
57
58 # Message box button flags
59
60 20 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
61 20 mfYesButton => 0x0100, # Put a Yes button into the dialog
62 mfNoButton => 0x0200, # Put a No button into the dialog
63 mfOKButton => 0x0400, # Put an OK button into the dialog
64 mfCancelButton => 0x0800, # Put a Cancel button into the dialog
65 20 };
66
67 20 ▶use constant mfYesNoCancel => mfYesButton | mfNoButton | mfCancelButton;
Subroutine BEGIN: called CC=1 SCAR=0.0
68 # Standard Yes, No, Cancel dialog
69 20 ▶use constant mfOKCancel => mfOKButton | mfCancelButton;
Subroutine BEGIN: called CC=1 SCAR=0.0
70 # Standard OK, Cancel dialog
71
72 20 1
73
74 __END__
« lib/TUI/Menus/Const.pm ↑ Summary lib/TUI/Objects/Collection.pm »