line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CTK::Plugin::Test; |
2
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
63
|
|
3
|
2
|
|
|
2
|
|
8
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=encoding utf-8 |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
CTK::Plugin::Test - Test plugin as example for Your plugins |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 1.01 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SYNOPSIS |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
use CTK; |
18
|
|
|
|
|
|
|
my $ctk = CTK->new( |
19
|
|
|
|
|
|
|
plugins => "test", |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
print $ctk->foo; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Test plugin as example for Your plugins. See L |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 init |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Initializer. Optional method. See L |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 METHODS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=over 8 |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=item B |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
print $ctk->foo; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Returns wrapped the tms value from CTK object |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=back |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 HISTORY |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
See C file |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
L, L |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 TO DO |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
See C file |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 BUGS |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
* none noted |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SEE ALSO |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L, L |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHOR |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Serż Minus (Sergey Lepenkov) L Eabalama@cpan.orgE |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 COPYRIGHT |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 LICENSE |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
74
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
See C file and L |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
2
|
|
|
2
|
|
69
|
use vars qw/ $VERSION /; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
109
|
|
81
|
|
|
|
|
|
|
$VERSION = '1.01'; |
82
|
|
|
|
|
|
|
|
83
|
2
|
|
|
2
|
|
9
|
use base qw/CTK::Plugin/; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
796
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub init { |
86
|
2
|
|
|
2
|
1
|
5
|
my $self = shift; # It is CTK object! |
87
|
|
|
|
|
|
|
# ... you can also call any base CTK methods here |
88
|
2
|
|
|
|
|
4
|
return 1; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
__PACKAGE__->register_method( |
92
|
|
|
|
|
|
|
namespace => "CTK", |
93
|
|
|
|
|
|
|
method => "foo", |
94
|
|
|
|
|
|
|
callback => sub { |
95
|
2
|
|
|
2
|
|
4
|
my $self = shift; # It is CTK object! |
96
|
2
|
|
|
|
|
21
|
return sprintf("The %s was called as foo method defined in Test. Say: %s\n", __PACKAGE__, $self->tms); |
97
|
|
|
|
|
|
|
}); |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
1; |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
__END__ |