| 1 | package TUI::App::DeskInit; | ||
| 2 | # ABSTRACT: helper for desktop background initialization | ||
| 3 | |||
| 4 | 39 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 39 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 39 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 39 | our $VERSION = '2.000002'; | |
| 9 | 39 | $VERSION =~ tr/_//d; | |
| 10 | 39 | our $AUTHORITY = 'cpan:BRICKPOOL'; | |
| 11 | |||
| 12 | 39 | ▶ | use Exporter 'import'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 39 | our @EXPORT = qw( | |
| 14 | TDeskInit | ||
| 15 | new_TDeskInit | ||
| 16 | ); | ||
| 17 | |||
| 18 | 39 | ▶ | use TUI::toolkit; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 39 | ▶ | use TUI::toolkit::Types qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | CodeRef | ||
| 21 | Object | ||
| 22 | 39 | ); | |
| 23 | |||
| 24 | sub TDeskInit() { __PACKAGE__ } | ||
| 25 | 0 | ▶ | sub new_TDeskInit { __PACKAGE__->from(@_) } |
|
Subroutine
new_TDeskInit: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 26 | |||
| 27 | # protected attributes | ||
| 28 | 0 | ▶ | has createBackground => ( 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 | createBackground => CodeRef, { alias => 'cBackground' } | ||
| 35 | ], | ||
| 36 | caller_level => +1, | ||
| 37 | ); | ||
| 38 | 2 | my ( $class, $args ) = $sig->( @_ ); | |
| 39 | 2 | return { %$args }; | |
| 40 | } | ||
| 41 | |||
| 42 | 0 | ▶ | sub from { # $obj ($cBackground) |
|
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, $cBackground ) = $sig->( @_ ); | |
| 48 | 0 | return $class->new( createBackground => $cBackground ); | |
| 49 | } | ||
| 50 | |||
| 51 | 1 | ▶ | sub createBackground { # $background ($r) |
|
Subroutine
createBackground: 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->{createBackground} ); | |
| 58 | 1 | return $class->$code( $r ); | |
| 59 | } | ||
| 60 | |||
| 61 | 39 | 1 | |
| 62 | |||
| 63 | __END__ | ||