CTK::Plugin - Base class for CTK plugins writing
Version 1.01
package CTK::Plugin::Foo; use strict; use base qw/CTK::Plugin/; sub init { my $self = shift; # It is CTK object! ... return 1; # or 0 if errors } __PACKAGE__->register_method( namespace => "CTK", # Optional. Default: CTK method => "foo", callback => sub { my $self = shift; # It is CTK object! ... return 1; }); 1;
A "plugin" for the CTK is simply a Perl module which exists in a known package location (CTK::Plugin::*) and conforms to a our standard, allowing it to be loaded and used automatically. See CTK::Plugin::Test for example
Allows you to initialize your plugin
The method is automatically call in CTK constructor. The first param is CTK object. The method MUST return 0 in case of failure or 1 in case of successful initialization
__PACKAGE__->register_method( namespace => "CTK", # Optional. Default: CTK method => "mothod_name", callback => sub { my $self = shift; # It is CTK object! ... return 1; });
Allows register the method that will be linked with Your plugin callback function
Init version
See Changes file
Changes
See TODO file
TODO
* none noted
CTK::Plugin::Test
Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE file and https://dev.perl.org/licenses/
LICENSE
To install CTK, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CTK
CPAN shell
perl -MCPAN -e shell install CTK
For more information on module installation, please visit the detailed CPAN module installation guide.