CTK - Command-line ToolKit
Version 1.18
use CTK; use CTK qw( :BASE ); # :SUBS and :VARS tags to export use CTK qw( :SUBS ); # :SUBS tag only to export use CTK qw( :VARS ); # :VARS tag only to export my $c = new CTK; my $c = new CTK ( prefix => 'myprogram', suffix => 'sample', cfgfile => '/path/to/conf/file.conf', voidfile => '/path/to/void/file.txt', needconfig => 1, # need creating empty config file loglevel => 'info', # or '1' logfile => CTK::catfile($LOGDIR,'foo.log'), logseparator => ' ', # as default );
CTKlib - Command-line ToolKit library (CTKlib). Command line interface (CLI)
CTKlib - is library that provides "extended-features" (utilities) for your robots written on Perl. Most of the functions and methods this module written very simple language and easy to understand. To work with CTKlib, you just need to start using it!
See also README file
README
my $c = new CTK; my $c = new CTK ( syspaths => 1 ); # need use system paths my $c = new CTK ( prefix => 'myprogram', suffix => 'sample', cfgfile => '/path/to/conf/file.conf', voidfile => '/path/to/void/file.txt', needconfig => 1, # need creating empty config file loglevel => 'info', # or '1' logfile => CTK::catfile($LOGDIR,'foo.log'), logseparator => ' ', # as default );
Main constructor. All the params are optional
Full path to the configuration file of the your project
Full path to the log file
Logging level. It can be set as: debug, info, notice, warning, error, crit, alert, emerg, fatal and except.
Separator for log columns. The default is the space character (" ")
Specifies the need to create an empty configuration file. Not recommended for use
Prefix and suffix of the name your project
The directive specifies the use of system paths for configuration, logging and allocation of temporary and working data
Full path to the VOID file for connections testing
For internal use only. Please not call this functions
Prints debug information on STDOUT or into general log-file
Returns debug flag set. 1 - on, 0 - off
Shows error and immediately exit from program with die state
Returns log flag set. 1 - on, 0 - off
Prints a string or a list of strings implicitly appends a newline
Returns the verbose flag in the opposite value. 0 - verbose, 1 - silent. See "verbosemode"" in "
Returns test flag set. 1 - on, 0 - off
Returns timestamp. For example: [8588] {TimeStamp: +0.5580 sec}
Returns verbose flag set. 1 - on, 0 - off
Init version
See CHANGES file for details
CHANGES
Archive::Extract, Archive::Tar, Archive::Zip, Config::General, DBI, ExtUtils::MakeMaker, File::Copy, File::Path, File::Pid, File::Spec, HTTP::Headers, HTTP::Request, HTTP::Response, IO::Handle, IPC::Open3, LWP, LWP::MediaTypes, LWP::UserAgent, MIME::Base64, MIME::Lite, Moose, namespace::autoclean, Net::FTP, Perl::OSType, Sys::SigAction, Term::ReadKey, Term::ReadLine, Test::More, Text::ParseWords, Time::Local, Time::HiRes, URI, YAML
See TODO file
TODO
* none noted
perl, Moose, CTK::Util, CTK::DBI, CTK::Status, CTK::FilePid, CTK::CPX
perl
The usual warnings if it can't read or write the files involved.
Sergey Lepenkov (Serz Minus) http://www.serzik.com <minus@mail333.com>
Copyright (C) 1998-2017 D&D Corporation. All Rights Reserved
This program is free software; you can redistribute it and/or modify it under the same terms and conditions as Perl itself.
This program is distributed under the GNU LGPL v3 (GNU Lesser General Public License version 3).
See LICENSE file
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.