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