CTK::Util - CTK Utilities
Version 2.75
$Revision: 180 $
use CTK::Util; use CTK::Util qw( :BASE ); # Export only BASE subroutines. See TAGS section my @ls = ls("."); # or (for CTK module) use CTK; my @ls = CTK::ls("."); # or (for core and extended subroutines only) use CTK; my $c = new CTK; my $prefix = $c->getsyscfg("prefix");
Public subroutines
All subroutines are listed in alphabetical order
$secs = basetime();
The time at which the program began running, in seconds. This function returns result of expression:
time() - $^T
Tags: BASE, DATE
$bindata = bload( $file_or_fh, $onutf8 );
Reading file in binary mode as ':raw:utf8' layer (if $onutf8 is true) or regular binary layer.
Tags: BASE, FILE, ATOM
$status = bsave( $file_or_fh, $bindata, $onutf8 );
Saving file in binary mode as ':raw:utf8' layer (if $onutf8 is true) or regular binary layer.
This is the File::Spec functions, and exported here for historical reasons.
See File::Spec::Functions and File::Spec for details
$path = catdir( @directories );
Concatenate two or more directory names to form a complete path ending with a directory. But remove the trailing slash from the resulting string, because it doesn't look good, isn't necessary and confuses OS/2. Of course, if this is the root directory, don't cut off the trailing slash :-)
$path = catfile( @directories, $filename );
Concatenate one or more directory names and a filename to form a complete path ending with a filename
$curdir = curdir();
Returns a string representation of the current directory.
@PATH = path();
Takes no argument. Returns the environment variable PATH (or the local platform's equivalent) as a list.
$rootdir = rootdir();
Returns a string representation of the root directory.
@dirs = splitdir( $directories );
The opposite of "catdir"
($volume,$directories,$file) = splitpath( $path ); ($volume,$directories,$file) = splitpath( $path, $no_file );
Splits a path in to volume, directory, and filename portions. On systems with no concept of volume, returns '' for volume.
For systems with no syntax differentiating filenames from directories, assumes that the last file is a path unless $no_file is true or a trailing separator or /. or /.. is present. On Unix, this means that $no_file true makes this return ( '', $path, '' ).
$tmpdir = tmpdir();
Returns a string representation of the first writable directory from a list of possible temporary directories. Returns the current directory if no writable temporary directories are found. The list of directories checked depends on the platform; e.g. File::Spec::Unix checks $ENV{TMPDIR} (unless taint is on) and /tmp.
$updir = updir();
Returns a string representation of the parent directory.
Tags: API, BASE
$cdatatext = cdata( $text );
Returns a string "<![CDATA[$text]]>" for plain XML documents.
Tags: BASE, FORMAT
$mydate = correct_date( $date );
Returns date in format dd.mm.yyyy or null ('') if $date is wrongly.
$mydig = correct_dig( $string );
Returns digits only from string or 0 if string is not correctly.
$mynumber = correct_number( $string, $sep );
Placement of separators discharges among digits. For example 1`234`567 if $sep is char "`" (default)
$date = current_date();
Returns current date in format dd.mm.yyyy
$datetime = current_date_time();
Returns current date in format dd.mm.yyyy hh.mm.ss
$dtd = date_time2dig( $datetime );
Returns $datetime (or current) in format yyyymmddhhmmss
$dd = date2dig( $date );
Returns $date (or current) in format yyyymmdd
$time = date2localtime( $date );
Returns time from date format dd.mm.yyyy in time() value in seconds since the system epoch (Midnight, January 1, 1970 GMT on Unix, for example).
See "timelocal" in Time::Local
See "dtf"
$time = datetime2localtime( $datetime );
Returns time from datetime format dd.mm.yyyy hh.mm.ss in time() value in seconds since the system epoch (Midnight, January 1, 1970 GMT on Unix, for example).
$string = dformat( $mask, \%replacehash );
Replace substrings "[...]" in mask and returns replaced result. Data for replacing get from \%replacehash
For example:
# -> 01-foo-bar.baz.tgz $string = dformat( "01-[NAME]-bar.[EXT].tgz", { NAME => 'foo', EXT => 'baz', } );
See also "fformat" for working with files
$date = dig2date_time( $dd );
Returns date (or current) from format yyyymmdd in format dd.mm.yyyy
$datetime = dig2date_time( $dtd );
Returns date (or current) from format yyyymmddhhmmss in format dd.mm.yyyy hh.mm.ss
$datetime = dtf( $format, $time ); $datetime = dtf( $format, $time, 1 ); # in GMT context $datetime = dtf( $format, $time, 'MSK' ); # TimeZone (Z) = MSK $datetime = dtf( $format, $time, 'GMT' ); # TimeZone (Z) = GMT
Returns time in your format. Each conversion specification is replaced by appropriate characters as described in the following list.
s, ss, _s - Seconds m, mm, _m - Minutes h, hh, _h - Hours D, DD, _D - Day of month M, MM, _M - Month Y, YY, YYY, YYYY - Year w - Short form of week day (Sat, Tue and etc) W - Week day (Saturdat, Tuesday and etc) MON, mon - Short form of month (Apr, May and etc) MONTH, month - Month (April, May and etc) Z - short name of local TimeZone G - short name of TimeZone GMT (for GMT context only) U - short name of TimeZone UTC (for GMT context only)
Examples:
# RFC822 (RSS) $dt = dtf("%w, %D %MON %YY %hh:%mm:%ss %G", time(), 1); # Tue, 3 Sep 2013 12:31:40 GMT # RFC850 $dt = dtf("%W, %DD-%MON-%YY %hh:%mm:%ss %G", time(), 1); # Tuesday, 03-Sep-13 12:38:41 GMT # RFC1036 $dt = dtf("%w, %D %MON %YY %hh:%mm:%ss %G", time(), 1); # Tue, 3 Sep 13 12:44:08 GMT # RFC1123 $dt = dtf("%w, %D %MON %YYYY %hh:%mm:%ss %G", time(), 1); # Tue, 3 Sep 2013 12:50:42 GMT # RFC2822 $dt = dtf("%w, %DD %MON %YYYY %hh:%mm:%ss +0400"); # Tue, 12 Feb 2013 16:07:05 +0400 # W3CDTF, ATOM (Same as RFC 3339/ISO 8601) -- Mail format $dt = dtf("%YYYY-%MM-%DDT%hh:%mm:%ss+04:00"); # 2013-02-12T16:10:28+04:00 # CTIME $dt = dtf("%w %MON %_D %hh:%mm:%ss %YYYY"); # Tue Feb 2 16:15:18 2013 # CTIME with TimeZone $dt = dtf("%w %MON %_D %hh:%mm:%ss %YYYY %Z", time(), 'MSK'); # Tue Feb 12 17:21:50 2013 MSK # Russian date and time format $dt = dtf("%DD.%MM.%YYYY %hh:%mm:%ss"); # 12.02.2013 16:16:53 # DIG form $dt = dtf("%YYYY%MM%DD%hh%mm%ss"); # 20130212161844 # HTTP headers format (See CGI::Util::expires) $dt = dtf("%w, %DD %MON %YYYY %hh:%mm:%ss %G", time, 1); # Tue, 12 Feb 2013 13:35:04 GMT # HTTP/cookie format (See CGI::Util::expires) $dt = dtf("%w, %DD-%MON-%YYYY %hh:%mm:%ss %G", time, 1); # Tue, 12-Feb-2013 13:35:04 GMT # COOKIE (RFC2616 as rfc1123-date) $dt = dtf("%w, %DD %MON %YYYY %hh:%mm:%ss %G", time, 1); # Tue, 12 Feb 2013 13:35:04 GMT
For more features please use Date::Format and DateTime
eqtime("source/file", "destination/file");
Sets modified time of destination to that of source.
$safe = escape("10% is enough\n");
Replaces each unsafe character in the string "10% is enough\n" with the corresponding escape sequence and returns the result. The string argument should be a string of bytes.
See also URI::Escape
$file = fformat( $mask, $filename );
Replace substrings "[FILENAME]", "[NAME]", "[FILEEXT]", "[EXT]" and "[FILE]" in mask and returns replaced result. Data for replacing get from filename:
[FILENAME] -- Fileneme only [NAME] -- Fileneme only [FILEEXT] -- Extension only [EXT] -- Extension only [FILE] -- = "[FILENAME].[FILEEXT]" ($filename)
$file = fformat( "01-[NAME]-bar.[EXT].tgz", "foo.baz" ); # -> 01-foo-bar.baz.tgz
See also "dformat"
See "bload"
See "bsave"
$textdata = fload( $file );
Reading file in regular text mode
$status = fsave( $file, $textdata );
Saving file in regular text mode
$listref = getdirlist( $dir, $mask );
Returns reference to array directories of directory $dir by $mask (regexp or scalar string).
See also "ls"
$listref = getlist( $dir, $mask );
Returns reference to array files of directory $dir by $mask (regexp or scalar string).
See "getfilelist"
See "fload"
$date = localtime2date( time() )
Returns time in format dd.mm.yyyy
$datetime = localtime2date_time( time() )
Returns time in format dd.mm.yyyy hh.mm.ss
@list = ls( $dir); @list = ls( $dir, $mask );
A function returns list content of directory $dir by $mask (regexp or scalar string)
$status = preparedir( $dir ); $status = preparedir( \@dirs ); $status = preparedir( \%dirs ); $status = preparedir( $dir, $chmode );
Preparing directory: creation and permission modification. The function returns true or false.
The $chmode argument should be a octal value, for example:
$status = preparedir( [qw/ foo bar baz /], 0777 );
$rand = randchars( $n ); # default chars collection: 0..9,'a'..'z','A'..'Z' $rand = randchars( $n, \@collection ); # Defined chars collection
Returns random sequence of casual characters by the amount of n
$rand = randchars( 8, [qw/a b c d e f/]); # -> cdeccfdf
$rand = randomize( $n );
Returns random number of the set amount of characters
See "fsave"
@dirs = scandirs( $dir, $mask );
A function returns all directories of directory $dir by $mask (regexp or scalar string) in format: [$path, $name]
@files = scanfiles( $dir, $mask );
A function returns all files of directory $dir by $mask (regexp or scalar string) in format: [$path, $name]
$stat = shred( $file );
Do a more secure overwrite of given files or devices, to make it harder for even very expensive hardware probing to recover the data.
@cards = shuffle(0..51); # 0..51 in a random order
Returns the elements of LIST in a random order
Pure-Perl implementation of Function List::Util::PP::shuffle (Copyright (c) 1997-2009 Graham Barr <gbarr@pobox.com>. All rights reserved.)
See also List::Util
$slashed = slash( $string );
Escaping symbols \ and ' and returns strings \\ and \'
See "fformat"
$detagged = tag( $string );
<, >, " and ' chars convert to <, >, " and ' strings.
$string = tag_create( $detagged );
Reverse function "tag"
$base64_text = to_base64( $utf8_text );
Function to encode strings into the base64 encoding specified in RFC 2045 - MIME (Multipurpose Internet Mail Extensions). The base64 encoding is designed to represent arbitrary sequences of octets in a form that need not be humanly readable. A 65-character subset ([A-Za-z0-9+/=]) of US-ASCII is used, enabling 6 bits to be represented per printable character.
See also MIME::Base64
See "to_windows1251"
$utf8_text = to_utf8( $win1251_text ) $utf8_text = to_utf8( $win1251_text, "Windows-1251" )
Decodes a sequence of octets ($win1251_text) assumed to be in ENCODING (Windows-1251) into Perl's internal form and returns the resulting string. As in encode(), ENCODING can be either a canonical name or an alias. For encoding names and aliases, see Encode.
Obsolete alias: CP1251toUTF8
$win1251_text = to_windows1251( $utf8_text ) $win1251_text = to_windows1251( $utf8, "Windows-1251" )
Encodes a string from Perl's internal form into ENCODING (Windows-1251) and returns a sequence of octets ($win1251_text). ENCODING can be either a canonical name or an alias. For encoding names and aliases, see Encode.
Obsolete alias: UTF8toCP1251
touch( "file" );
Makes file exist, with current timestamp
$string = translate( $rus_string );
Translation russian (windows-1251/CP-1251) chars in latin symbols (poland transcription)
$str = unescape(escape("10% is enough\n"));
Returns a string with each %XX sequence replaced with the actual byte (octet).
This does the same as:
$string =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
$fixlenstr = variant_stf( "qwertyuiop", 3 ); # -> q.p $fixlenstr = variant_stf( "qwertyuiop", 7 ); # -> qw...op
Returns a line the fixed length from 3 to the n chars
$lybool = visokos( 2012 );
Returns a leap-year or not
See "execute"
Tags: UTIL, ATOM
$out = execute( "ls -la" ); $out = execute( "ls -la", $in, \$err, $binmode );
Executing external (system) command with IPC::Open3 using.
Variables $in, $err and $binmode is OPTIONAL.
$binmode set up binary mode layer as ':raw:utf8' layer (if $binmode is ':raw:utf8', for example) or regular binary layer (if $binmode is true).
See also IPC::Open3
%ftpct = ( ftphost => '192.168.1.1', ftpuser => 'login', ftppassword => 'password', ftpdir => '~/', voidfile => './void.txt', #ftpattr => {}, # See Net::FTP ); $ftpct = ftp( \%ftpct, 'connect' ); # Returns the connect's object $rfiles = ftp( \%ftpct, 'ls' ); # Returns reference to array of directory listing @remotefiles = $rfiles ? grep {!(/^\./)} @$rfiles : (); ftp( \%ftpct, 'delete', $rfile ); # Delete remote file ftp( \%ftpct, 'get', $rfile, $lfile ); # Get remote file to local file ftp( \%ftpct, 'put', $lfile, $rfile ); # Put local file to remote file
Simple working with FTP.
See also Net::FTP
$rfiles = ftpgetlist( \%ftpct, $mask);
Returns reference to array of remote source listing by mask (as regexp, optional)
See "ftp"
$status = ftptest( \%ftpct );
FTP connect testing.
my $sent = sendmail( -to => 'to@example.com', -cc => 'cc@example.com', ### OPTIONAL -from => 'from@example.com', -subject => 'my subject', -message => 'my message', -type => 'text/plain', -sendmail => '/usr/sbin/sendmail', ### OPTIONAL -charset => 'windows-1251', -flags => '-t', ### OPTIONAL -smtp => '192.168.1.1', ### OPTIONAL -authuser => '', ### OPTIONAL -authpass => '', ### OPTIONAL -attach => [ ### OPTIONAL { Type=>'text/plain', Data=>'document 1 content', Filename=>'doc1.txt', Disposition=>'attachment', }, { Type=>'text/plain', Data=>'document 2 content', Filename=>'doc2.txt', Disposition=>'attachment', }, { Type=>'text/html', Data=>'blah-blah-blah', Filename=>'response.htm', Disposition=>'attachment', }, { Type=>'image/gif', Path=>'aaa000123.gif', Filename=>'logo.gif', Disposition=>'attachment', }, ### ... ### ], ); debug($sent ? 'mail has been sent :)' : 'mail was not sent :(');
Send mail. See MIME::Lite for details
See "sendmail"
my $value = cachedir(); my $value = $c->cachedir();
For example value can be set as: /var/cache
/var/cache is intended for cached data from applications. Such data is locally generated as a result of time-consuming I/O or calculation. The application must be able to regenerate or restore the data. Unlike /var/spool, the cached files can be deleted without data loss. The data must remain valid between invocations of the application and rebooting the system.
Files located under /var/cache may be expired in an application specific manner, by the system administrator, or both. The application must always be able to recover from manual deletion of these files (generally because of a disk space shortage). No other requirements are made on the data format of the cache directories.
See http://www.pathname.com/fhs/pub/ and "cachedir" in Sys::Path
my $value = docdir(); my $value = $c->docdir();
For example value can be set as: /usr/share/doc
See "docdir" in Sys::Path
my $value = localedir(); my $value = $c->localedir();
For example value can be set as: /usr/share/locale
See "localedir" in Sys::Path
my $value = localstatedir(); my $value = $c->localstatedir();
For example value can be set as: /var
/var - $Config::Config{'prefix'}
/var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files. Some portions of /var are not shareable between different systems. For instance, /var/log, /var/lock, and /var/run. Other portions may be shared, notably /var/mail, /var/cache/man, /var/cache/fonts, and /var/spool/news.
/var is specified here in order to make it possible to mount /usr read-only. Everything that once went into /usr that is written to during system operation (as opposed to installation and software maintenance) must be in /var. If /var cannot be made a separate partition, it is often preferable to move /var out of the root partition and into the /usr partition. (This is sometimes done to reduce the size of the root partition or when space runs low in the root partition.) However, /var must not be linked to /usr because this makes separation of /usr and /var more difficult and is likely to create a naming conflict. Instead, link /var to /usr/var.
Applications must generally not add directories to the top level of /var. Such directories should only be added if they have some system-wide implication, and in consultation with the FHS mailing list.
See http://www.pathname.com/fhs/pub/ and "localstatedir" in Sys::Path
my $value = lockdir(); my $value = $c->lockdir();
For example value can be set as: /var/lock
Lock files should be stored within the /var/lock directory structure. Lock files for devices and other resources shared by multiple applications, such as the serial device lock files that were originally found in either /usr/spool/locks or /usr/spool/uucp, must now be stored in /var/lock. The naming convention which must be used is "LCK.." followed by the base name of the device. For example, to lock /dev/ttyS0 the file "LCK..ttyS0" would be created. 5
The format used for the contents of such lock files must be the HDB UUCP lock file format. The HDB format is to store the process identifier (PID) as a ten byte ASCII decimal number, with a trailing newline. For example, if process 1230 holds a lock file, it would contain the eleven characters: space, space, space, space, space, space, one, two, three, zero, and newline.
See http://www.pathname.com/fhs/pub/ and "lockdir" in Sys::Path
my $value = prefixdir(); my $value = $c->prefixdir();
For example value can be set as: /usr
/usr - $Config::Config{'prefix'}
Is a helper function and should not be used directly.
/usr is the second major section of the filesystem. /usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any information that is host-specific or varies with time is stored elsewhere.
Large software packages must not use a direct subdirectory under the /usr hierarchy.
See http://www.pathname.com/fhs/pub/ and "prefix" in Sys::Path
my $value = rundir(); my $value = $c->rundir();
For example value can be set as: /var/run
This directory contains system information data describing the system since it was booted. Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process. Programs may have a subdirectory of /var/run; this is encouraged for programs that use more than one run-time file. 7 Process identifier (PID) files, which were originally placed in /etc, must be placed in /var/run. The naming convention for PID files is <program-name>.pid. For example, the crond PID file is named /var/run/crond.pid.
See http://www.pathname.com/fhs/pub/ and "rundir" in Sys::Path
my $value = sharedir(); my $value = $c->sharedir();
For example value can be set as: /usr/share
The /usr/share hierarchy is for all read-only architecture independent data files. 10 This hierarchy is intended to be shareable among all architecture platforms of a given OS; thus, for example, a site with i386, Alpha, and PPC platforms might maintain a single /usr/share directory that is centrally-mounted. Note, however, that /usr/share is generally not intended to be shared by different OSes or by different releases of the same OS.
Any program or package which contains or requires data that doesn’t need to be modified should store that data in /usr/share (or /usr/local/share, if installed locally). It is recommended that a subdirectory be used in /usr/share for this purpose.
Game data stored in /usr/share/games must be purely static data. Any modifiable files, such as score files, game play logs, and so forth, should be placed in /var/games.
See http://www.pathname.com/fhs/pub/ and "datadir" in Sys::Path
my $value = sharedstatedir(); my $value = $c->sharedstatedir();
For example value can be set as: /var/lib
This hierarchy holds state information pertaining to an application or the system. State information is data that programs modify while they run, and that pertains to one specific host. Users must never need to modify files in /var/lib to configure a package’s operation.
State information is generally used to preserve the condition of an application (or a group of inter-related applications) between invocations and between different instances of the same application. State information should generally remain valid after a reboot, should not be logging output, and should not be spooled data.
An application (or a group of inter-related applications) must use a subdirectory of /var/lib for its data. There is one required subdirectory, /var/lib/misc, which is intended for state files that don’t need a subdirectory; the other subdirectories should only be present if the application in question is included in the distribution.
/var/lib/<name> is the location that must be used for all distribution packaging support. Different distributions may use different names, of course.
See http://www.pathname.com/fhs/pub/ and "sharedstatedir" in Sys::Path
my $value = spooldir(); my $value = $c->spooldir();
For example value can be set as: /var/spool
/var/spool contains data which is awaiting some kind of later processing. Data in /var/spool represents work to be done in the future (by a program, user, or administrator); often data is deleted after it has been processed.
See http://www.pathname.com/fhs/pub/ and "spooldir" in Sys::Path
my $value = srvdir(); my $value = $c->srvdir();
For example value can be set as: /srv
/srv contains site-specific data which is served by this system.
See http://www.pathname.com/fhs/pub/ and "srvdir" in Sys::Path
my $value = sysconfdir(); my $value = $c->sysconfdir();
For example value can be set as: /etc
The /etc hierarchy contains configuration files. A "configuration file" is a local file used to control the operation of a program; it must be static and cannot be an executable binary.
See http://www.pathname.com/fhs/pub/ and "sysconfdir" in Sys::Path
my $value = syslogdir(); my $value = $c->syslogdir();
For example value can be set as: /var/log
This directory contains miscellaneous log files. Most logs must be written to this directory or an appropriate subdirectory.
See http://www.pathname.com/fhs/pub/ and "logdir" in Sys::Path
my $value = webdir(); my $value = $c->webdir();
For example value can be set as: /var/www
Directory where distribution put static web files.
See "webdir" in Sys::Path
This is the Carp functions, and exported here for historical reasons.
carp( "string trimmed to 80 chars" );
Warn user (from perspective of caller)
croak( "We're outta here!" );
Die of errors (from perspective of caller)
cluck( "This is how we got here!" );
Warn user (more detailed what carp with stack backtrace)
confess( "not implemented" );
Die of errors with stack backtrace
See "syscfg"
Returns true or false if the OS name is of the current value of $^O
$^O
isos('mswin32') ? "OK" : "NO"; # or $c->isos('mswin32') ? "OK" : "NO";
See Perl::OSType for details
Given an OS type and OS name, returns true or false if the OS name is of the given type.
isostype('Windows') ? "OK" : "NO"; isostype('Unix', 'dragonfly') ? "OK" : "NO"; # or $c->isostype('Windows') ? "OK" : "NO"; $c->isostype('Unix', 'dragonfly') ? "OK" : "NO";
See "is_os_type" in Perl::OSType
Smart rearrangement of parameters to allow named parameter calling. We do the rearrangement if the first parameter begins with a -
my @args = @_; my ($content, $maxcnt, $timeout, $timedie, $base, $login, $password, $host, $table_tmp); ($content, $maxcnt, $timeout, $timedie, $base, $login, $password, $host, $table_tmp) = read_attributes([ ['DATA','CONTENT','USERDATA'], ['COUNT','MAXCOUNT','MAXCNT'], ['TIMEOUT','FORBIDDEN','INTERVAL'], ['TIMEDIE','TIME'], ['BD','DB','BASE','DATABASE'], ['LOGIN','USER'], ['PASSWORD','PASS'], ['HOST','HOSTNAME','ADDRESS','ADDR'], ['TABLE','TABLENAME','NAME','SESSION','SESSIONNAME'] ],@args) if defined $args[0];
See CGI::Util
Returns all hash %Config from system module Config or one value of this hash
my %syscfg = syscfg(); my $prefix = syscfg( "prefix" ); # or my %syscfg = $c->syscfg(); my $prefix = $c->syscfg( "prefix" );
See Config module for details
Export all subroutines, default:
CP1251toUTF8, UTF8toCP1251, "basetime", "bload", "bsave", "cachedir", "carp", "catdir", "catfile", "cdata", "cluck", "com", "confess", "correct_date", "correct_dig", "correct_number", "croak", "curdir", "current_date", "current_date_time", "date2dig", "date2localtime", "date_time2dig", "datef", "datetime2localtime", "datetimef", "dformat", "dig2date", "dig2date_time", "docdir", "dtf", "eqtime", "escape", "exe", "execute", "fformat", "file_load", "file_save", "fload", "fsave", "ftp", "ftpgetlist", "ftptest", "getdirlist", "getfilelist", "getlist", "getsyscfg", "isos", "isostype", "load_file", "localedir", "localstatedir", "localtime2date", "localtime2date_time", "lockdir", "ls", "path", "prefixdir", "preparedir", "randchars", "randomize", "read_attributes", "rootdir", "rundir", "save_file", "scandirs", "scanfiles", "send_mail", "sendmail", "sharedir", "sharedstatedir", "shuffle", "slash", "splitdir", "splitformat", "splitpath", "spooldir", "srvdir", "syscfg", "sysconfdir", "syslogdir", "tag", "tag_create", "timef", "tmpdir", "to_base64", "to_cp1251", "to_utf8", "to_windows1251", "touch", "translate", "unescape", "updir", "variant_stf", "visokos", "webdir"
CP1251toUTF8
UTF8toCP1251
Export only base subroutines:
CP1251toUTF8, UTF8toCP1251, "basetime", "bload", "bsave", "cachedir", "carp", "catdir", "catfile", "cdata", "cluck", "confess", "correct_date", "correct_dig", "correct_number", "croak", "curdir", "current_date", "current_date_time", "date2dig", "date2localtime", "date_time2dig", "datef", "datetime2localtime", "datetimef", "dformat", "dig2date", "dig2date_time", "docdir", "dtf", "eqtime", "escape", "fformat", "file_load", "file_save", "fload", "fsave", "getdirlist", "getfilelist", "getlist", "getsyscfg", "isos", "isostype", "load_file", "localedir", "localstatedir", "localtime2date", "localtime2date_time", "lockdir", "ls", "path", "prefixdir", "preparedir", "randchars", "randomize", "read_attributes", "rootdir", "rundir", "save_file", "scandirs", "scanfiles", "sharedir", "sharedstatedir", "shred", "shuffle", "slash", "splitdir", "splitformat", "splitpath", "spooldir", "srvdir", "syscfg", "sysconfdir", "syslogdir", "tag", "tag_create", "timef", "tmpdir", "to_base64", "to_cp1251", "to_utf8", "to_windows1251", "touch", "translate", "unescape", "updir", "variant_stf", "visokos", "webdir"
Export only text format subroutines:
CP1251toUTF8, UTF8toCP1251, "cdata", "correct_dig", "correct_number", "dformat", "escape", "fformat", "randchars", "randomize", "shuffle", "slash", "splitformat", "tag", "tag_create", "to_base64", "to_cp1251", "to_utf8", "to_windows1251", "translate", "unescape", "variant_stf"
Export only date and time subroutines:
"basetime", "correct_date", "current_date", "current_date_time", "date2dig", "date2localtime", "date_time2dig", "datef", "datetime2localtime", "datetimef", "dig2date", "dig2date_time", "dtf", "localtime2date", "localtime2date_time", "timef", "visokos"
Export only file and directories subroutines:
"bload", "bsave", "eqtime", "file_load", "file_save", "fload", "fsave", "getdirlist", "getfilelist", "getlist", "load_file", "ls", "preparedir", "save_file", "scandirs", "scanfiles", "shred", "touch"
Export only utility subroutines:
"com", "exe", "execute", "ftp", "ftpgetlist", "ftptest", "send_mail", "sendmail"
Export only processing subroutines:
"bload", "bsave", "com", "eqtime", "exe", "execute", "file_load", "file_save", "fload", "fsave", "ftp", "ftpgetlist", "ftptest", "getdirlist", "getfilelist", "getlist", "load_file", "ls", "preparedir", "save_file", "scandirs", "scanfiles", "send_mail", "sendmail", "shred", "touch"
Export only inerface subroutines:
"cachedir", "carp", "catdir", "catfile", "cluck", "confess", "croak", "curdir", "docdir", "getsyscfg", "isos", "isostype", "localedir", "localstatedir", "lockdir", "path", "prefixdir", "read_attributes", "rootdir", "rundir", "sharedir", "sharedstatedir", "splitdir", "splitpath", "spooldir", "srvdir", "syscfg", "sysconfdir", "syslogdir", "tmpdir", "updir", "webdir"
MIME::Lite, CGI::Util, Time::Local, Net::FTP, IPC::Open3, List::Util
Serz Minus (Lepenkov Sergey) http://www.serzik.com <minus@mail333.com>
Copyright (C) 1998-2014 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
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'doesn’t'. Assuming CP1252
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.