| 1 | package TUI::Help::TopicDefinition; | ||||||||||
| 2 | # ABSTRACT: linked help-topic definition | ||||||||||
| 3 | |||||||||||
| 4 | 8 | ▶ | use 5.010; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 8 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 8 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 8 | our $VERSION = '2.000003'; | |||||||||
| 9 | 8 | $VERSION =~ tr/_//d; | |||||||||
| 10 | 8 | our $AUTHORITY = 'cpan:BRICKPOOL'; | |||||||||
| 11 | |||||||||||
| 12 | 8 | ▶ | use Exporter 'import'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 8 | our @EXPORT = qw( | |||||||||
| 14 | TTopicDefinition | ||||||||||
| 15 | new_TTopicDefinition | ||||||||||
| 16 | ); | ||||||||||
| 17 | |||||||||||
| 18 | 8 | ▶ | use TUI::toolkit; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | 8 | ▶ | use TUI::toolkit::Types qw( | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | is_Object | ||||||||||
| 21 | :types | ||||||||||
| 22 | 8 | ); | |||||||||
| 23 | |||||||||||
| 24 | 8 | ▶ | use TUI::Objects::Object; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 25 | |||||||||||
| 26 | sub TTopicDefinition() { __PACKAGE__ } | ||||||||||
| 27 | 2 | ▶ | sub new_TTopicDefinition { __PACKAGE__->from(@_) } | ||||||||
|
Subroutine
new_TTopicDefinition: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 28 | |||||||||||
| 29 | 8 | extends TObject; | |||||||||
| 30 | |||||||||||
| 31 | 8 | has topic => ( is => 'rw' ); | |||||||||
| 32 | 8 | has value => ( is => 'rw' ); | |||||||||
| 33 | 8 | has next => ( is => 'rw', default => undef ); | |||||||||
| 34 | |||||||||||
| 35 | 2 | ▶ | sub BUILDARGS { # \%args (%args) | ||||||||
|
Subroutine
BUILDARGS: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 36 | 2 | state $sig = signature( | |||||||||
| 37 | method => 1, | ||||||||||
| 38 | named => [ | ||||||||||
| 39 | topic => Str, | ||||||||||
| 40 | value => PositiveOrZeroInt, | ||||||||||
| 41 | ], | ||||||||||
| 42 | caller_level => +1, | ||||||||||
| 43 | ); | ||||||||||
| 44 | 2 | my ( $class, $args ) = $sig->( @_ ); | |||||||||
| 45 | 2 | return { %$args }; | |||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | 2 | ▶ | sub from { # $definition ($aTopic, $aValue) | ||||||||
|
Subroutine
from: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 49 | 2 | state $sig = signature( | |||||||||
| 50 | method => 1, | ||||||||||
| 51 | pos => [Str, PositiveOrZeroInt], | ||||||||||
| 52 | ); | ||||||||||
| 53 | 2 | my ( $class, $aTopic, $aValue ) = $sig->( @_ ); | |||||||||
| 54 | 2 | return $class->new( topic => $aTopic, value => $aValue ); | |||||||||
| 55 | } | ||||||||||
| 56 | |||||||||||
| 57 | 2 | ▶ | sub DEMOLISH { # void ($in_global_destruction) | ||||||||
|
Subroutine
DEMOLISH: called CC=3 SCAR=11.1
Pod
documented
| |||||||||||
| 58 | 2 | my ( $self, $in_global_destruction ) = @_; | |||||||||
| 59 | 2 | ▶ | assert ( @_ == 2 ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 60 | 2 | ▶ | assert( is_Object $self ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 61 | 2 | undef $self->{topic}; | |||||||||
| 62 | 2 | undef $self->{next}; | |||||||||
| 63 | 2 | return; | |||||||||
| 64 | } | ||||||||||
| 65 | |||||||||||
| 66 | 8 | 1 | |||||||||
| 67 | |||||||||||
| 68 | __END__ | ||||||||||