CTKlib

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "MIME::Base64" : "3",
            "MIME::Lite" : "3",
            "Net::FTP" : "2.6",
            "Perl::OSType" : "1",
            "Symbol" : "1.05",
            "Sys::Syslog" : "0",
            "Term::ANSIColor" : "4.03",
            "Text::SimpleTable" : "2",
            "Time::HiRes" : "1.97",
            "Time::Local" : "1.2",
            "Try::Tiny" : "0.27",
            "URI" : "1.6",
            "XML::Simple" : "2.22",
            "XSLoader" : "0.01",
            "YAML" : "0.73",
            "YAML::XS" : "0.4",
            "perl" : "5.016001"
         }
      }
   },
   "release_status" : "stable",

META.yml  view on Meta::CPAN

  MIME::Base64: '3'
  MIME::Lite: '3'
  Net::FTP: '2.6'
  Perl::OSType: '1'
  Symbol: '1.05'
  Sys::Syslog: '0'
  Term::ANSIColor: '4.03'
  Text::SimpleTable: '2'
  Time::HiRes: '1.97'
  Time::Local: '1.2'
  Try::Tiny: '0.27'
  URI: '1.6'
  XML::Simple: '2.22'
  XSLoader: '0.01'
  YAML: '0.73'
  YAML::XS: '0.4'
  perl: '5.016001'
resources:
  homepage: https://www.serzik.com
  license: https://dev.perl.org/licenses
  repository: https://abalama@git.code.sf.net/p/ctklib/code

Makefile.PL  view on Meta::CPAN

        'MIME::Base64'          => 3.00, # libemail-mime-encodings-perl
        'MIME::Lite'            => 3.00, # libmime-lite-perl
        'Net::FTP'              => 2.60,
        'Perl::OSType'          => 1.00,
        'Symbol'                => 1.05,
        'Sys::Syslog'           => 0,
        'Term::ANSIColor'       => 4.03,
        'Text::SimpleTable'     => 2.00, # libtext-simpletable-perl
        'Time::HiRes'           => 1.97,
        'Time::Local'           => 1.20,
        'Try::Tiny'             => 0.27, # libtry-tiny-perl
        'URI'                   => 1.60, # liburi-perl
        'XML::Simple'           => 2.22, # libxml-simple-perl
        'XSLoader'              => 0.01,
        'YAML'                  => 0.73, # libyaml-perl
        'YAML::XS'              => 0.40, # libyaml-libyaml-perl
    };

my $exefiles = [qw(
        bin/ctklib
    )];

README  view on Meta::CPAN

    2.00 Mon Apr 29 10:36:06 MSK 2019

      New edition of the library

    See Changes file

DEPENDENCIES

    Config::General, JSON, JSON::XS, List::Util, MIME::Lite, Perl::OSType,
    Sys::Syslog, Term::ANSIColor, Text::SimpleTable, Time::Local,
    Try::Tiny, URI, XML::Simple, YAML, YAML::XS

TO DO

    See TODO file

BUGS

    * none noted

SEE ALSO

lib/CTK.pm  view on Meta::CPAN


L<Config::General>,
L<JSON>, L<JSON::XS>,
L<List::Util>,
L<MIME::Lite>,
L<Perl::OSType>,
L<Sys::Syslog>,
L<Term::ANSIColor>,
L<Text::SimpleTable>,
L<Time::Local>,
L<Try::Tiny>,
L<URI>,
L<XML::Simple>,
L<YAML>, L<YAML::XS>

=head1 TO DO

See C<TODO> file

=head1 BUGS

lib/CTK/Configuration.pm  view on Meta::CPAN

=item B<1.00 Mon Apr 29 10:36:06 MSK 2019>

Init version

=back

See C<Changes> file

=head1 DEPENDENCIES

L<Config::General>, L<Try::Tiny>

=head1 TO DO

See C<TODO> file

=head1 BUGS

* none noted

=head1 SEE ALSO

lib/CTK/Configuration.pm  view on Meta::CPAN


See C<LICENSE> file and L<https://dev.perl.org/licenses/>

=cut

use vars qw($VERSION);
$VERSION = '1.01';

use Carp;
use Config::General;
use Try::Tiny;
use Time::HiRes qw/gettimeofday/;
use Cwd qw/getcwd/;
use File::Spec ();

use constant {
    CONF_DIR    => "conf",
    LOCKED_KEYS => [qw/hitime loadstatus/],
};

sub new {

lib/CTK/Daemon.pm  view on Meta::CPAN

=item B<1.01 Mon 13 May 19:53:01 MSK 2019>

Moved to CTKlib project

=back

See C<Changes> file

=head1 DEPENDENCIES

L<CTK>, L<POSIX>, L<Sys::Syslog>, L<Try::Tiny>

=head1 TO DO

See C<TODO> file

=head1 BUGS

* none noted

=head1 SEE ALSO

lib/CTK/Daemon.pm  view on Meta::CPAN

See C<LICENSE> file and L<https://dev.perl.org/licenses>

=cut

use vars qw/$VERSION @EXPORT $DEV_DEBUG/;
$VERSION = '1.06';

use Carp;
use File::Spec;
use POSIX qw/ :sys_wait_h /;
use Try::Tiny;
use Sys::Syslog ();

use CTKx;
use CTK::Util qw/ :API :CORE /;
use CTK::ConfGenUtil;
use CTK::TFVals qw/ :ALL /;
use CTK::FilePid;
use CTK::Log;

use base qw/Exporter/;

lib/CTK/Log.pm  view on Meta::CPAN



use vars qw/$VERSION %EXPORT_TAGS @EXPORT_OK/;
$VERSION = '2.64';

use base qw/Exporter/;

use Carp;
use IO::File;
use Sys::Syslog ();
use Try::Tiny;
use Cwd qw/getcwd/;
use File::Spec ();

@EXPORT_OK = qw(
        LOG_DEBUG LOG_INFO LOG_NOTICE LOG_NOTE LOG_WARNING LOG_WARN LOG_ERR
        LOG_ERROR LOG_CRIT LOG_ALERT LOG_EMERG LOG_EMERGENCY LOG_FATAL
        LOG_EXCEPT LOG_EXCEPTION
    );

%EXPORT_TAGS = (

lib/CTK/Serializer.pm  view on Meta::CPAN

    return %$out;
}

1;

package CTK::Serializer::JSON;
use strict;
use utf8;
use JSON;
#use JSON::XS;
use Try::Tiny;

sub _serialize { # Structure -> JSON
    my $self = shift;
    my $struct = shift || {};
    my $attr = shift || {};
    $attr->{utf8} = 0 unless defined $attr->{utf8};
    $attr->{pretty} = 1 unless defined $attr->{pretty};
 # my $coder = JSON::XS->new->pretty($attr->{pretty}); #->allow_blessed(0)->utf8;
 # $coder = $coder->allow_blessed($attr->{allow_blessed}) if $attr->{allow_blessed};
 # $coder = $coder->allow_nonref($attr->{allow_nonref}) if $attr->{allow_nonref};

lib/CTK/Serializer.pm  view on Meta::CPAN

    };
    return %$out;
}

1;

package CTK::Serializer::XML;
use strict;
use utf8;
use XML::Simple;
use Try::Tiny;

sub _serialize { # Structure -> XML
    my $self = shift;
    my $struct = shift || {};
    my $attr = shift || {};
    my $doc = "";
    my $err = "";
    my $stt = 1;
    try {
        $doc = XMLout($struct, %$attr);

lib/CTK/Serializer.pm  view on Meta::CPAN

    };
    return %$out;
}

1;

package CTK::Serializer::YAML;
use strict;
use utf8;
use YAML::XS;
use Try::Tiny;

sub _serialize { # Structure -> YAML
    my $self = shift;
    my $struct = shift || {};
    my $doc = "";
    my $err = "";
    my $stt = 1;
    try {
        $doc = Dump($struct);
    } catch {



( run in 0.916 second using v1.01-cache-2.11-cpan-05444aca049 )