lib/TUI/Gadgets/CalendarWindow.pm

filter: Statementstmt 59.4% 41 / 69 Branchbran 0.0% 0 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 70.5% 12 / 17 Podpod 60.0% 3 / 5 totaltotal 55.4% 56 / 101 CC 6 SCAR 18.1
CC
6
Cov
52%
build
20.0
BUILD
12.0
new_TCalendarWindow
2.0
CRAP 6.1
« lib/TUI/Dialogs/ListBox.pm ↑ Summary lib/TUI/Gadgets/PuzzleWindow.pm »
1 package TUI::Gadgets::CalendarWindow;
2 # ABSTRACT: window containing a month calendar
3
4 5 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7
8 5 our $VERSION = '2.000003';
9 5 $VERSION =~ tr/_//d;
10 5 our $AUTHORITY = 'cpan:BRICKPOOL';
11
12 5 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 5 our @EXPORT = qw(
14 TCalendarWindow
15 new_TCalendarWindow
16 );
17
18 5 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
19 5 ▶use Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 5 ▶use TUI::toolkit;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 5 ▶use TUI::toolkit::Types qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
22 is_Object
23 is_Str
24 :types
25 5 );
26
27 5 ▶use TUI::Gadgets::CalendarView;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 5 ▶use TUI::Objects::Rect;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 5 ▶use TUI::Views::Const qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
30 wfGrow
31 wfZoom
32 wnNoNumber
33 wpCyanWindow
34 5 );
35 5 ▶use TUI::Views::Window;
Subroutine BEGIN: called CC=1 SCAR=0.0
36
37 sub TCalendarWindow() { __PACKAGE__ }
38 sub name() { 'TCalendarWindow' }
39 0 ▶sub new_TCalendarWindow { __PACKAGE__->from(@_) }
Subroutine new_TCalendarWindow: not called CC=1 SCAR=6.9
Pod documented
40
41 5 extends TWindow;
42
43 0 ▶sub BUILDARGS { # \%args (%args)
Subroutine BUILDARGS: not called CC=1 SCAR=6.9
Pod documented
44 0 state $sig = signature(
45 method => 1,
46 named => [],
47 caller_level => +1,
48 );
49 0 my ( $class ) = $sig->( @_ );
50 0 local $Carp::CarpLevel = $Carp::CarpLevel + 1;
51 0 return $class->SUPER::BUILDARGS(
52 bounds => TRect->new( ax => 1, ay => 1, bx => 23, by => 11 ),
53 title => 'Calendar',
54 number => wnNoNumber,
55 );
56 }
57
58 0 ▶sub BUILD { # void (\%args)
Subroutine BUILD: not called CC=3 SCAR=24.8
Pod documented
59 0 my ( $self, $args ) = @_;
60 0 ▶ assert ( @_ == 2 );
Branch: 1 branch
BranchTrueFalseTotal
unless @_ == 2 0 0 0
61 0 ▶ assert ( is_Object $self );
Branch: 1 branch
BranchTrueFalseTotal
unless &is_Object($self) 0 0 0
62
63 0 $self->{flags} &= ~( wfZoom | wfGrow );
64 0 $self->{growMode} = 0;
65 0 $self->{palette} = wpCyanWindow;
66
67 0 my $r = $self->getExtent();
68 0 $r->grow( -1, -1 );
69 0 $self->insert( TCalendarView->new( bounds => $r ) );
70 0 return;
71 }
72
73 0 ▶sub from { # $calendarWindow ()
Subroutine from: not called CC=1 SCAR=6.9
Pod undocumented
74 0 state $sig = signature(
75 method => 1,
76 pos => [],
77 );
78 0 my ( $class ) = $sig->( @_ );
79 0 return $class->new();
80 }
81
82 0 ▶sub build { # $obj ()
Subroutine build: not called CC=4 SCAR=30.0
Pod undocumented
83 0 my ( $class ) = @_;
84 0 ▶ assert ( @_ == 1 );
Branch: 1 branch
BranchTrueFalseTotal
unless @_ == 1 0 0 0
85 0 ▶ assert ( is_Str $class );
Branch: 1 branch
BranchTrueFalseTotal
unless &is_Str($class) 0 0 0
86 0 ▶ assert ( Storable::is_retrieving );
Branch: 1 branch
BranchTrueFalseTotal
unless &Storable::is_retrieving() 0 0 0
87 0 return $class->new();
88 }
89
90 5 1
91
92 __END__
« lib/TUI/Dialogs/ListBox.pm ↑ Summary lib/TUI/Gadgets/PuzzleWindow.pm »