Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK ! TWü6h h tpage.podnu ÏÃ6Ç$ =head1 NAME
Template::Tools::tpage - Process templates from command line
=head1 USAGE
tpage [ --define var=value ] file(s)
=head1 DESCRIPTION
The B script is a simple wrapper around the Template Toolkit processor.
Files specified by name on the command line are processed in turn by the
template processor and the resulting output is sent to STDOUT and can be
redirected accordingly. e.g.
tpage myfile > myfile.out
tpage header myfile footer > myfile.html
If no file names are specified on the command line then B will read
STDIN for input.
The C<--define> option can be used to set the values of template variables.
e.g.
tpage --define author="Andy Wardley" skeleton.pm > MyModule.pm
=head2 The F<.tpagerc> Configuration File
You can use a F<.tpagerc> file in your home directory.
The purpose of this file is to set any I configuration options
that you want applied I time F is run. For example, you
can use the C to use template files from a generic template
directory.
Run C for a summary of the options available.
See L for general information about the Perl Template
Toolkit and the template language and features.
=head1 AUTHOR
Andy Wardley L
=head1 COPYRIGHT
Copyright (C) 1996-2008 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=head1 SEE ALSO
L
=cut
# Local Variables:
# mode: perl
# perl-indent-level: 4
# indent-tabs-mode: nil
# End:
#
# vim: expandtab shiftwidth=4:
PK ! ÖÖ0üH) H) ttree.podnu ÏÃ6Ç$ =head1 NAME
Template::Tools::ttree - Process entire directory trees of templates
=head1 SYNOPSIS
ttree [options] [files]
=head1 DESCRIPTION
The F script is used to process entire directory trees containing
template files. The resulting output from processing each file is then
written to a corresponding file in a destination directory. The script
compares the modification times of source and destination files (where
they already exist) and processes only those files that have been modified.
In other words, it is the equivalent of 'make' for the Template Toolkit.
It supports a number of options which can be used to configure
behaviour, define locations and set Template Toolkit options. The
script first reads the F<.ttreerc> configuration file in the HOME
directory, or an alternative file specified in the TTREERC environment
variable. Then, it processes any command line arguments, including
any additional configuration files specified via the C<-f> (file)
option.
=head2 The F<.ttreerc> Configuration File
When you run F for the first time it will ask you if you want
it to create a F<.ttreerc> file for you. This will be created in your
home directory.
$ ttree
Do you want me to create a sample '.ttreerc' file for you?
(file: /home/abw/.ttreerc) [y/n]: y
/home/abw/.ttreerc created. Please edit accordingly and re-run ttree
The purpose of this file is to set any I configuration options
that you want applied I time F is run. For example, you
can use the C and C option to provide regular expressions
that specify which files should be ignored and which should be copied
rather than being processed as templates. You may also want to set
flags like C and C according to your preference.
A minimal F<.ttreerc>:
# ignore these files
ignore = \b(CVS|RCS)\b
ignore = ^#
ignore = ~$
# copy these files
copy = \.(gif|png|jpg|pdf)$
# recurse into directories
recurse
# provide info about what's going on
verbose
In most cases, you'll want to create a different F configuration
file for each project you're working on. The C option allows you
to specify a directory where F can find further configuration
files.
cfg = /home/abw/.ttree
The C<-f> command line option can be used to specify which configuration
file should be used. You can specify a filename using an absolute or
relative path:
$ ttree -f /home/abw/web/example/etc/ttree.cfg
$ ttree -f ./etc/ttree.cfg
$ ttree -f ../etc/ttree.cfg
If the configuration file does not begin with C> or C<.> or something
that looks like a MS-DOS absolute path (e.g. C) then
F will look for it in the directory specified by the C option.
$ ttree -f test1 # /home/abw/.ttree/test1
The C option can only be used in the F<.ttreerc> file. All the
other options can be used in the F<.ttreerc> or any other F
configuration file. They can all also be specified as command line
options.
Remember that F<.ttreerc> is always processed I any
configuration file specified with the C<-f> option. Certain options
like C can be used any number of times and accumulate their values.
For example, consider the following configuration files:
F:
cfg = /home/abw/.ttree
lib = /usr/local/tt2/templates
F:
lib = /home/abw/web/example/templates/lib
When F is invoked as follows:
$ ttree -f myconfig
the C option will be set to the following directories:
/usr/local/tt2/templates
/home/abw/web/example/templates/lib
Any templates located under F will be used
in preference to those located under
F. This may be what you want,
but then again, it might not. For this reason, it is good practice to
keep the F<.ttreerc> as simple as possible and use different
configuration files for each F project.
=head2 Directory Options
The C option is used to define the directory containing the
source templates to be processed. It can be provided as a command
line option or in a configuration file as shown here:
src = /home/abw/web/example/templates/src
Each template in this directory typically corresponds to a single
web page or other document.
The C option is used to specify the destination directory for the
generated output.
dest = /home/abw/web/example/html
The C option is used to define one or more directories containing
additional library templates. These templates are not documents in
their own right and typically comprise of smaller, modular components
like headers, footers and menus that are incorporated into pages templates.
lib = /home/abw/web/example/templates/lib
lib = /usr/local/tt2/templates
The C option can be used repeatedly to add further directories to
the search path.
A list of templates can be passed to F as command line arguments.
$ ttree foo.html bar.html
It looks for these templates in the C directory and processes them
through the Template Toolkit, using any additional template components
from the C directories. The generated output is then written to
the corresponding file in the C directory.
If F is invoked without explicitly specifying any templates
to be processed then it will process every file in the C directory.
If the C<-r> (recurse) option is set then it will additionally iterate
down through sub-directories and process and other template files it finds
therein.
$ ttree -r
If a template has been processed previously, F will compare the
modification times of the source and destination files. If the source
template (or one it is dependant on) has not been modified more
recently than the generated output file then F will not process
it. The F<-a> (all) option can be used to force F to process
all files regardless of modification time.
$ ttree -a
Any templates explicitly named as command line argument are always
processed and the modification time checking is bypassed.
=head2 File Options
The C, C and C options are used to specify Perl
regexen to filter file names. Files that match any of the C
options will not be processed. Remaining files that match any of the
C regexen will be copied to the destination directory. Remaining
files that then match any of the C criteria are then processed
via the Template Toolkit. If no C parameter is specified then
all files will be accepted for processing if not already copied or
ignored.
# ignore these files
ignore = \b(CVS|RCS)\b
ignore = ^#
ignore = ~$
# copy these files
copy = \.(gif|png|jpg|pdf)$
# accept only .tt2 templates
accept = \.tt2$
The C option is used to define mappings between the file
extensions for source templates and the generated output files. The
following example specifies that source templates with a C<.tt2>
suffix should be output as C<.html> files:
suffix tt2=html
Or on the command line,
--suffix tt2=html
You can provide any number of different suffix mappings by repeating
this option.
=head2 Template Dependencies
The C and C options allow you to specify
how any given template file depends on another file or group of files.
The C option is used to express a single dependency.
$ ttree --depend foo=bar,baz
This command line example shows the C<--depend> option being used to
specify that the F file is dependant on the F and F
templates. This option can be used many time on the command line:
$ ttree --depend foo=bar,baz --depend crash=bang,wallop
or in a configuration file:
depend foo=bar,baz
depend crash=bang,wallop
The file appearing on the left of the C<=> is specified relative to
the C or C directories. The file(s) appearing on the right
can be specified relative to any of these directories or as absolute
file paths.
For example:
$ ttree --depend foo=bar,/tmp/baz
To define a dependency that applies to all files, use C<*> on the
left of the C<=>.
$ ttree --depend *=header,footer
or in a configuration file:
depend *=header,footer
Any templates that are defined in the C, C,
C or C options will automatically be added to the
list of global dependencies that apply to all templates.
The C option can be used to specify a file that contains
dependency information.
$ ttree --depend_file=/home/abw/web/example/etc/ttree.dep
Here is an example of a dependency file:
# This is a comment. It is ignored.
index.html: header footer menubar
header: titlebar hotlinks
menubar: menuitem
# spanning multiple lines with the backslash
another.html: header footer menubar \
sidebar searchform
Lines beginning with the C<#> character are comments and are ignored.
Blank lines are also ignored. All other lines should provide a
filename followed by a colon and then a list of dependant files
separated by whitespace, commas or both. Whitespace around the colon
is also optional. Lines ending in the C<\> character are continued
onto the following line.
Files that contain spaces can be quoted. That is only necessary
for files after the colon (':'). The file before the colon may be
quoted if it contains a colon.
As with the command line options, the C<*> character can be used
as a wildcard to specify a dependency for all templates.
* : config,header
=head2 Template Toolkit Options
F also provides access to the usual range of Template Toolkit
options. For example, the C<--pre_chomp> and C<--post_chomp> F
options correspond to the C and C options.
Run C for a summary of the options available.
=head1 AUTHORS
Andy Wardley Eabw@wardley.orgE
L
With contributions from Dylan William Hardison (support for
dependencies), Bryce Harrington (C and C options),
Mark Anderson (C and C options), Harald Joerg and Leon
Brocard who gets everywhere, it seems.
=head1 COPYRIGHT
Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=head1 SEE ALSO
L
PK ! h¡µ# µ# Tiny.pmnu „[µü¤ package Test2::Tools::Tiny;
use strict;
use warnings;
BEGIN {
if ($] lt "5.008") {
require Test::Builder::IO::Scalar;
}
}
use Scalar::Util qw/blessed/;
use Test2::Util qw/try/;
use Test2::API qw/context run_subtest test2_stack/;
use Test2::Hub::Interceptor();
use Test2::Hub::Interceptor::Terminator();
our $VERSION = '1.302135';
BEGIN { require Exporter; our @ISA = qw(Exporter) }
our @EXPORT = qw{
ok is isnt like unlike is_deeply diag note skip_all todo plan done_testing
warnings exception tests capture
};
sub ok($;$@) {
my ($bool, $name, @diag) = @_;
my $ctx = context();
return $ctx->pass_and_release($name) if $bool;
return $ctx->fail_and_release($name, @diag);
}
sub is($$;$@) {
my ($got, $want, $name, @diag) = @_;
my $ctx = context();
my $bool;
if (defined($got) && defined($want)) {
$bool = "$got" eq "$want";
}
elsif (defined($got) xor defined($want)) {
$bool = 0;
}
else { # Both are undef
$bool = 1;
}
return $ctx->pass_and_release($name) if $bool;
$got = '*NOT DEFINED*' unless defined $got;
$want = '*NOT DEFINED*' unless defined $want;
unshift @diag => (
"GOT: $got",
"EXPECTED: $want",
);
return $ctx->fail_and_release($name, @diag);
}
sub isnt($$;$@) {
my ($got, $want, $name, @diag) = @_;
my $ctx = context();
my $bool;
if (defined($got) && defined($want)) {
$bool = "$got" ne "$want";
}
elsif (defined($got) xor defined($want)) {
$bool = 1;
}
else { # Both are undef
$bool = 0;
}
return $ctx->pass_and_release($name) if $bool;
unshift @diag => "Strings are the same (they should not be)"
unless $bool;
return $ctx->fail_and_release($name, @diag);
}
sub like($$;$@) {
my ($thing, $pattern, $name, @diag) = @_;
my $ctx = context();
my $bool;
if (defined($thing)) {
$bool = "$thing" =~ $pattern;
unshift @diag => (
"Value: $thing",
"Does not match: $pattern"
) unless $bool;
}
else {
$bool = 0;
unshift @diag => "Got an undefined value.";
}
return $ctx->pass_and_release($name) if $bool;
return $ctx->fail_and_release($name, @diag);
}
sub unlike($$;$@) {
my ($thing, $pattern, $name, @diag) = @_;
my $ctx = context();
my $bool;
if (defined($thing)) {
$bool = "$thing" !~ $pattern;
unshift @diag => (
"Unexpected pattern match (it should not match)",
"Value: $thing",
"Matches: $pattern"
) unless $bool;
}
else {
$bool = 0;
unshift @diag => "Got an undefined value.";
}
return $ctx->pass_and_release($name) if $bool;
return $ctx->fail_and_release($name, @diag);
}
sub is_deeply($$;$@) {
my ($got, $want, $name, @diag) = @_;
my $ctx = context();
no warnings 'once';
require Data::Dumper;
# Otherwise numbers might be unquoted
local $Data::Dumper::Useperl = 1;
local $Data::Dumper::Sortkeys = 1;
local $Data::Dumper::Deparse = 1;
local $Data::Dumper::Freezer = 'XXX';
local *UNIVERSAL::XXX = sub {
my ($thing) = @_;
if (ref($thing)) {
$thing = {%$thing} if "$thing" =~ m/=HASH/;
$thing = [@$thing] if "$thing" =~ m/=ARRAY/;
$thing = \"$$thing" if "$thing" =~ m/=SCALAR/;
}
$_[0] = $thing;
};
my $g = Data::Dumper::Dumper($got);
my $w = Data::Dumper::Dumper($want);
my $bool = $g eq $w;
return $ctx->pass_and_release($name) if $bool;
return $ctx->fail_and_release($name, $g, $w, @diag);
}
sub diag {
my $ctx = context();
$ctx->diag(join '', @_);
$ctx->release;
}
sub note {
my $ctx = context();
$ctx->note(join '', @_);
$ctx->release;
}
sub skip_all {
my ($reason) = @_;
my $ctx = context();
$ctx->plan(0, SKIP => $reason);
$ctx->release if $ctx;
}
sub todo {
my ($reason, $sub) = @_;
my $ctx = context();
# This code is mostly copied from Test2::Todo in the Test2-Suite
# distribution.
my $hub = test2_stack->top;
my $filter = $hub->pre_filter(
sub {
my ($active_hub, $event) = @_;
if ($active_hub == $hub) {
$event->set_todo($reason) if $event->can('set_todo');
$event->add_amnesty({tag => 'TODO', details => $reason});
}
else {
$event->add_amnesty({tag => 'TODO', details => $reason, inherited => 1});
}
return $event;
},
inherit => 1,
todo => $reason,
);
$sub->();
$hub->pre_unfilter($filter);
$ctx->release if $ctx;
}
sub plan {
my ($max) = @_;
my $ctx = context();
$ctx->plan($max);
$ctx->release;
}
sub done_testing {
my $ctx = context();
$ctx->done_testing;
$ctx->release;
}
sub warnings(&) {
my $code = shift;
my @warnings;
local $SIG{__WARN__} = sub { push @warnings => @_ };
$code->();
return \@warnings;
}
sub exception(&) {
my $code = shift;
local ($@, $!, $SIG{__DIE__});
my $ok = eval { $code->(); 1 };
my $error = $@ || 'SQUASHED ERROR';
return $ok ? undef : $error;
}
sub tests {
my ($name, $code) = @_;
my $ctx = context();
my $be = caller->can('before_each');
$be->($name) if $be;
my $bool = run_subtest($name, $code, 1);
$ctx->release;
return $bool;
}
sub capture(&) {
my $code = shift;
my ($err, $out) = ("", "");
my $handles = test2_stack->top->format->handles;
my ($ok, $e);
{
my ($out_fh, $err_fh);
($ok, $e) = try {
# Scalar refs as filehandles were added in 5.8.
if ($] ge "5.008") {
open($out_fh, '>', \$out) or die "Failed to open a temporary STDOUT: $!";
open($err_fh, '>', \$err) or die "Failed to open a temporary STDERR: $!";
}
# Emulate scalar ref filehandles with a tie.
else {
$out_fh = Test::Builder::IO::Scalar->new(\$out) or die "Failed to open a temporary STDOUT";
$err_fh = Test::Builder::IO::Scalar->new(\$err) or die "Failed to open a temporary STDERR";
}
test2_stack->top->format->set_handles([$out_fh, $err_fh, $out_fh]);
$code->();
};
}
test2_stack->top->format->set_handles($handles);
die $e unless $ok;
$err =~ s/ $/_/mg;
$out =~ s/ $/_/mg;
return {
STDOUT => $out,
STDERR => $err,
};
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Test2::Tools::Tiny - Tiny set of tools for unfortunate souls who cannot use
L.
=head1 DESCRIPTION
You should really look at L. This package is some very basic
essential tools implemented using L. This exists only so that L
and other tools required by L can be tested. This is the package
L uses to test itself.
=head1 USE Test2::Suite INSTEAD
Use L if at all possible.
=head1 EXPORTS
=over 4
=item ok($bool, $name)
=item ok($bool, $name, @diag)
Run a simple assertion.
=item is($got, $want, $name)
=item is($got, $want, $name, @diag)
Assert that 2 strings are the same.
=item isnt($got, $do_not_want, $name)
=item isnt($got, $do_not_want, $name, @diag)
Assert that 2 strings are not the same.
=item like($got, $regex, $name)
=item like($got, $regex, $name, @diag)
Check that the input string matches the regex.
=item unlike($got, $regex, $name)
=item unlike($got, $regex, $name, @diag)
Check that the input string does not match the regex.
=item is_deeply($got, $want, $name)
=item is_deeply($got, $want, $name, @diag)
Check 2 data structures. Please note that this is a I implementation that
compares the output of L against both structures.
=item diag($msg)
Issue a diagnostics message to STDERR.
=item note($msg)
Issue a diagnostics message to STDOUT.
=item skip_all($reason)
Skip all tests.
=item todo $reason => sub { ... }
Run a block in TODO mode.
=item plan($count)
Set the plan.
=item done_testing()
Set the plan to the current test count.
=item $warnings = warnings { ... }
Capture an arrayref of warnings from the block.
=item $exception = exception { ... }
Capture an exception.
=item tests $name => sub { ... }
Run a subtest.
=item $output = capture { ... }
Capture STDOUT and STDERR output.
Result looks like this:
{
STDOUT => "...",
STDERR => "...",
}
=back
=head1 SOURCE
The source code repository for Test2 can be found at
F.
=head1 MAINTAINERS
=over 4
=item Chad Granum Eexodist@cpan.orgE
=back
=head1 AUTHORS
=over 4
=item Chad Granum Eexodist@cpan.orgE
=back
=head1 COPYRIGHT
Copyright 2018 Chad Granum Eexodist@cpan.orgE.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See F
=cut
PK ! TWü6h h tpage.podnu ÏÃ6Ç$ PK ! ÖÖ0üH) H) ¡ ttree.podnu ÏÃ6Ç$ PK ! h¡µ# µ# "0 Tiny.pmnu „[µü¤ PK Ù T