HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/share/doc/perltidy/examples/ex_mp.pl
#!/usr/bin/perl -w

# example call to perltidy from man page documentation of Perl::Tidy

use strict;
use Perl::Tidy;

my $source_string = <<'EOT';
my$error=Perl::Tidy::perltidy(argv=>$argv,source=>\$source_string,
    destination=>\$dest_string,stderr=>\$stderr_string,
errorfile=>\$errorfile_string,);
EOT

my $dest_string;
my $stderr_string;
my $errorfile_string;
my $argv = "-npro";   # Ignore any .perltidyrc at this site
$argv .= " -pbp";     # Format according to perl best practices
$argv .= " -nst";     # Must turn off -st in case -pbp is specified
$argv .= " -se";      # -se appends the errorfile to stderr
## $argv .= " --spell-check";  # uncomment to trigger an error

print "<<RAW SOURCE>>\n$source_string\n";

my $error = Perl::Tidy::perltidy(
    argv        => $argv,
    source      => \$source_string,
    destination => \$dest_string,
    stderr      => \$stderr_string,
    errorfile   => \$errorfile_string,    # not used when -se flag is set
    ##phasers     => 'stun',                # uncomment to trigger an error
);

if ($error) {

    # serious error in input parameters, no tidied output
    print "<<STDERR>>\n$stderr_string\n";
    die "Exiting because of serious errors\n";
}

if ($dest_string)      { print "<<TIDIED SOURCE>>\n$dest_string\n" }
if ($stderr_string)    { print "<<STDERR>>\n$stderr_string\n" }
if ($errorfile_string) { print "<<.ERR file>>\n$errorfile_string\n" }