| 1 | package TUI::App::ProgInit; | ||
| 2 | # ABSTRACT: program initialization helper | ||
| 3 | |||
| 4 | 38 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 38 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 38 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 38 | our $VERSION = '2.000002'; | |
| 9 | 38 | $VERSION =~ tr/_//d; | |
| 10 | 38 | our $AUTHORITY = 'cpan:BRICKPOOL'; | |
| 11 | |||
| 12 | 38 | ▶ | use Exporter 'import'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 38 | our @EXPORT = qw( | |
| 14 | TProgInit | ||
| 15 | new_TProgInit | ||
| 16 | ); | ||
| 17 | |||
| 18 | 38 | ▶ | use TUI::toolkit; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 38 | ▶ | use TUI::toolkit::Types qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | CodeRef | ||
| 21 | Object | ||
| 22 | 38 | ); | |
| 23 | |||
| 24 | sub TProgInit() { __PACKAGE__ } | ||
| 25 | 0 | ▶ | sub new_TProgInit { __PACKAGE__->from(@_) } |
|
Subroutine
new_TProgInit: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 26 | |||
| 27 | # protected attributes | ||
| 28 | 0 | ▶ | has createStatusLine => ( is => 'bare', default => sub { die 'required' } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 29 | 0 | ▶ | has createMenuBar => ( is => 'bare', default => sub { die 'required' } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 30 | 0 | ▶ | has createDeskTop => ( is => 'bare', default => sub { die 'required' } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 31 | |||
| 32 | 2 | ▶ | sub BUILDARGS { # \%args (%args) |
|
Subroutine
BUILDARGS: called CC=1 SCAR=0.0
Pod
documented
| |||
| 33 | 2 | state $sig = signature( | |
| 34 | method => 1, | ||
| 35 | named => [ | ||
| 36 | createStatusLine => CodeRef, { alias => 'cStatusLine' }, | ||
| 37 | createMenuBar => CodeRef, { alias => 'cMenuBar' }, | ||
| 38 | createDeskTop => CodeRef, { alias => 'cDeskTop' }, | ||
| 39 | ], | ||
| 40 | caller_level => +1, | ||
| 41 | ); | ||
| 42 | 2 | my ( $class, $args ) = $sig->( @_ ); | |
| 43 | 2 | return { %$args }; | |
| 44 | } | ||
| 45 | |||
| 46 | 0 | ▶ | sub from { # $obj ($cStatusLine, $cMenuBar, $cDeskTop) |
|
Subroutine
from: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 47 | 0 | state $sig = signature( | |
| 48 | method => 1, | ||
| 49 | pos => [CodeRef, CodeRef, CodeRef], | ||
| 50 | ); | ||
| 51 | 0 | my ( $class, @args ) = $sig->( @_ ); | |
| 52 | 0 | return $class->new( cStatusLine => $args[0], cMenuBar => $args[1], | |
| 53 | cDeskTop => $args[2] ); | ||
| 54 | } | ||
| 55 | |||
| 56 | 1 | ▶ | sub createStatusLine { # $statusLine ($r) |
|
Subroutine
createStatusLine: called CC=1 SCAR=0.0
Pod
documented
| |||
| 57 | 1 | state $sig = signature( | |
| 58 | method => Object, | ||
| 59 | pos => [Object], | ||
| 60 | ); | ||
| 61 | 1 | my ( $self, $r ) = $sig->( @_ ); | |
| 62 | 1 | my ( $class, $code ) = ( ref $self, $self->{createStatusLine} ); | |
| 63 | 1 | return $class->$code( $r ); | |
| 64 | } | ||
| 65 | |||
| 66 | 1 | ▶ | sub createMenuBar { # $menuBar ($r) |
|
Subroutine
createMenuBar: called CC=1 SCAR=0.0
Pod
documented
| |||
| 67 | 1 | state $sig = signature( | |
| 68 | method => Object, | ||
| 69 | pos => [Object], | ||
| 70 | ); | ||
| 71 | 1 | my ( $self, $r ) = $sig->( @_ ); | |
| 72 | 1 | my ( $class, $code ) = ( ref $self, $self->{createMenuBar} ); | |
| 73 | 1 | return $class->$code( $r ); | |
| 74 | } | ||
| 75 | |||
| 76 | 1 | ▶ | sub createDeskTop { # $deskTop ($r) |
|
Subroutine
createDeskTop: called CC=1 SCAR=0.0
Pod
documented
| |||
| 77 | 1 | state $sig = signature( | |
| 78 | method => Object, | ||
| 79 | pos => [Object], | ||
| 80 | ); | ||
| 81 | 1 | my ( $self, $r ) = $sig->( @_ ); | |
| 82 | 1 | my ( $class, $code ) = ( ref $self, $self->{createDeskTop} ); | |
| 83 | 1 | return $class->$code( $r ); | |
| 84 | } | ||
| 85 | |||
| 86 | 38 | 1 | |
| 87 | |||
| 88 | __END__ | ||