Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/usr/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/bin/yamlpp-highlight
#!/usr/bin/perl
use strict;
use warnings;

use YAML::PP::Highlight;
use Encode;

my ($file) = @ARGV;
my $yaml;

unless ($file) {
    $yaml = do { local $/; <STDIN> };
    $yaml = decode_utf8($yaml);
}

my $error;
my $tokens;
if (defined $file) {
    ($error, $tokens) = YAML::PP::Parser->yaml_to_tokens( file => $file );
}
else {
    ($error, $tokens) = YAML::PP::Parser->yaml_to_tokens( string => $yaml );
}
my $highlighted = YAML::PP::Highlight->ansicolored($tokens);
print encode_utf8 $highlighted;
if ($error) {
    die $error;
}

Hry