| 1 | package TUI::Views::WindowInit; | ||
| 2 | # ABSTRACT: A class for initializing a frame for TWindows. | ||
| 3 | |||
| 4 | 34 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 34 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 34 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 34 | our $VERSION = '2.000002'; | |
| 9 | 34 | $VERSION =~ tr/_//d; | |
| 10 | 34 | our $AUTHORITY = 'cpan:BRICKPOOL'; | |
| 11 | |||
| 12 | 34 | ▶ | use Exporter 'import'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 34 | our @EXPORT = qw( | |
| 14 | TWindowInit | ||
| 15 | new_TWindowInit | ||
| 16 | ); | ||
| 17 | |||
| 18 | 34 | ▶ | use TUI::toolkit; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 34 | ▶ | use TUI::toolkit::Types qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | CodeRef | ||
| 21 | Object | ||
| 22 | 34 | ); | |
| 23 | |||
| 24 | sub TWindowInit() { __PACKAGE__ } | ||
| 25 | 0 | ▶ | sub new_TWindowInit { __PACKAGE__->from(@_) } |
|
Subroutine
new_TWindowInit: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 26 | |||
| 27 | # declare attributes | ||
| 28 | 0 | ▶ | has createFrame => ( is => 'bare', default => sub { die 'required' } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 29 | |||
| 30 | 2 | ▶ | sub BUILDARGS { # \%args (%args) |
|
Subroutine
BUILDARGS: called CC=1 SCAR=0.0
Pod
documented
| |||
| 31 | 2 | state $sig = signature( | |
| 32 | method => 1, | ||
| 33 | named => [ | ||
| 34 | createFrame => CodeRef, { alias => 'cFrame' }, | ||
| 35 | ], | ||
| 36 | caller_level => +1, | ||
| 37 | ); | ||
| 38 | 2 | my ( $class, $args ) = $sig->( @_ ); | |
| 39 | 2 | return { %$args }; | |
| 40 | } | ||
| 41 | |||
| 42 | 0 | ▶ | sub from { # $obj ($cFrame) |
|
Subroutine
from: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 43 | 0 | state $sig = signature( | |
| 44 | method => 1, | ||
| 45 | pos => [CodeRef], | ||
| 46 | ); | ||
| 47 | 0 | my ( $class, $cFrame ) = $sig->( @_ ); | |
| 48 | 0 | return $class->new( cFrame => $cFrame ); | |
| 49 | } | ||
| 50 | |||
| 51 | 1 | ▶ | sub createFrame { # $frame ($r) |
|
Subroutine
createFrame: called CC=1 SCAR=0.0
Pod
documented
| |||
| 52 | 1 | state $sig = signature( | |
| 53 | method => Object, | ||
| 54 | pos => [Object], | ||
| 55 | ); | ||
| 56 | 1 | my ( $self, $r ) = $sig->( @_ ); | |
| 57 | 1 | my ( $class, $code ) = ( ref $self, $self->{createFrame} ); | |
| 58 | 1 | return $class->$code( $r ); | |
| 59 | } | ||
| 60 | |||
| 61 | 34 | 1 | |
| 62 | |||
| 63 | __END__ | ||