-
-
02 Sep 2020 06:41:12 UTC
- Distribution: CTKlib
- Module version: 1.00
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Clone repository
- Issues
- Testers (69 / 0 / 5)
- Kwalitee
Bus factor: 1- 40.88% Coverage
- License: perl_5
- Perl: v5.16.1
- Activity
24 month- Tools
- Download (129.99KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Class::C3::Adopt::NEXT
- Class::Singleton
- Config::General
- DBI
- ExtUtils::MakeMaker
- File::Copy
- File::Copy::Recursive
- File::Find
- File::Path
- File::Pid
- File::Spec
- File::Temp
- IO
- IO::String
- IPC::Open3
- JSON
- List::Util
- MIME::Base64
- MIME::Lite
- MRO::Compat
- Net::FTP
- Perl::OSType
- Symbol
- Sys::SigAction
- Sys::Syslog
- Term::ANSIColor
- Text::SimpleTable
- Time::HiRes
- Time::Local
- Try::Tiny
- URI
- XML::Simple
- XSLoader
- YAML
- YAML::XS
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
CTK::Plugin - Base class for CTK plugins writing
VERSION
Version 1.00
SYNOPSIS
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;
DESCRIPTION
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
init
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
register_method
__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
HISTORY
See
Changes
fileTO DO
See
TODO
fileBUGS
* none noted
SEE ALSO
AUTHOR
Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>
COPYRIGHT
Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved
LICENSE
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/Module Install Instructions
To install CTK, copy and paste the appropriate command in to your terminal.
cpanm CTK
perl -MCPAN -e shell install CTK
For more information on module installation, please visit the detailed CPAN module installation guide.