SILENT KILLERPanel

Current Path: > > usr > local > share > perl5 > XML > SAX > PurePerl > >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //usr/local/share/perl5/XML/SAX/PurePerl//

NameTypeSizeLast ModifiedActions
Reader Directory - -
DTDDecls.pm File 16992 bytes June 13 2019 23:18:28.
DebugHandler.pm File 1879 bytes June 13 2019 23:18:28.
DocType.pm File 4658 bytes June 13 2019 23:24:14.
EncodingDetect.pm File 2628 bytes June 13 2019 23:18:28.
Exception.pm File 1707 bytes June 13 2019 23:18:28.
NoUnicodeExt.pm File 628 bytes June 13 2019 23:18:28.
Productions.pm File 6623 bytes June 13 2019 23:18:28.
Reader.pm File 2541 bytes June 13 2019 23:18:28.
UnicodeExt.pm File 369 bytes June 13 2019 23:18:28.
XMLDecl.pm File 3389 bytes June 13 2019 23:18:28.

Reading File: //usr/local/share/perl5/XML/SAX/PurePerl///Exception.pm

# $Id$

package XML::SAX::PurePerl::Exception;

use strict;

use overload '""' => "stringify";

use vars qw/$StackTrace/;

$StackTrace = $ENV{XML_DEBUG} || 0;

sub throw {
    my $class = shift;
    die $class->new(@_);
}

sub new {
    my $class = shift;
    my %opts = @_;
    die "Invalid options" unless exists $opts{Message};
    
    if ($opts{reader}) {
        return bless { Message => $opts{Message},
                        Exception => undef, # not sure what this is for!!!
                        ColumnNumber => $opts{reader}->column,
                        LineNumber => $opts{reader}->line,
                        PublicId => $opts{reader}->public_id,
                        SystemId => $opts{reader}->system_id,
                        $StackTrace ? (StackTrace => stacktrace()) : (),
                    }, $class;
    }
    return bless { Message => $opts{Message},
                    Exception => undef, # not sure what this is for!!!
                  }, $class;
}

sub stringify {
    my $self = shift;
    local $^W;
    return $self->{Message} . " [Ln: " . $self->{LineNumber} . 
                ", Col: " . $self->{ColumnNumber} . "]" .
                ($StackTrace ? stackstring($self->{StackTrace}) : "") . "\n";
}

sub stacktrace {
    my $i = 2;
    my @fulltrace;
    while (my @trace = caller($i++)) {
        my %hash;
        @hash{qw(Package Filename Line)} = @trace[0..2];
        push @fulltrace, \%hash;
    }
    return \@fulltrace;
}

sub stackstring {
    my $stacktrace = shift;
    my $string = "\nFrom:\n";
    foreach my $current (@$stacktrace) {
        $string .= $current->{Filename} . " Line: " . $current->{Line} . "\n";
    }
    return $string;
}

1;


SILENT KILLER Tool