The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CTK::Util - CTK Utilities

VERSION

Version 1.00

REVISION

$Revision: 88 $

SYNOPSIS

    use CTK::Util;
    use CTK::Util qw( :ALL ); # Export only ALL tag. See TAGS section
    
    my @ls = ls(".");
    

DESCRIPTION

Public subrountines

SUBROUNTINES

prefixdir

See Sys::Path prefix

localstatedir

See Sys::Path localstatedir

sysconfdir

See Sys::Path sysconfdir

sharedir

See Sys::Path datadir

docdir

See <Sys::Path> docdir

localedir

See Sys::Path localedir

cachedir

See Sys::Path cachedir

syslogdir

See Sys::Path logdir

spooldir

See Sys::Path spooldir

rundir

See Sys::Path rundir

lockdir

See Sys::Path lockdir

sharedstatedir

See Sys::Path sharedstatedir

webdir

See Sys::Path webdir

srvdir

See Sys::Path srvdir

TAGS

ALL, DEFAULT

Export all subrountines, default

BASE

Export only base subrountines

FORMAT

Export only text format subrountines

DATE

Export only date and time subrountines

FILE

Export only file and directories subrountines

UTIL

Export only utilities subrountines

ATOM

Export only processing subrountines

API

Export only inerface subrountines

SENDMAIL

    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 :(');

GENERAL API

    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 ALSO

MIME::Lite, CGI::Util, Time::Local, Net::FTP, IPC::Open3

AUTHOR

Serz Minus (Lepenkov Sergey) http://serzik.ru <minus@mail333.com>

COPYRIGHT

Copyright (C) 1998-2013 D&D Corporation. All Rights Reserved

LICENSE

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