PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /opt/cpanel/perl5/514/site_lib/Devel/
Server: Linux server2.noticiasdecolima.com 4.18.0-553.30.1.el8_10.x86_64 #1 SMP Tue Nov 26 02:30:26 EST 2024 x86_64
IP: 107.161.180.42
Choose File :

Url:
Dir : //opt/cpanel/perl5/514/site_lib/Devel/MyTrace.pm

package MyTrace;
use strict;
use warnings;
use Carp;
#use v5.10;

# perl -d:MyTrace program.pl

my %seen;

$|=1;

BEGIN {
    my $trace_file = $ENV{TRACE_FILE} || "STDERR";
    print STDERR "Saving trace to $trace_file\n";

    my $fh = do {
        if ( $trace_file eq '-'      ) { \*STDOUT }
        elsif ( $trace_file eq 'STDERR' ) { \*STDERR }
        else {
            open my $fh, '>>', $trace_file;
            $fh;
        }
    };

    sub DB::DB {
        my( $package, $file, $line ) = caller;
        # only display debut for current script calls
        unless ($ENV{FULLTRACE}) {
            return unless $file eq $0;
        }
        return if $file =~ qr{/warnings\.pm};
        return if $file =~ qr{/Carp\.pm};
        return if $file =~ qr{/warnings/};
        return if $file =~ qr{/overload.pm};
        return if $file =~ /Test\/Builder\.pm$/;
        return if $file =~ /Test\/More\.pm$/;
        return if $file =~ /Cpanel\/Logger\.pm$/;
        if ( $ENV{CPANELTRACE} ) {
            # only want Cpanel modules
            warn $file unless $seen{$file}++;
            #return unless $file =~ /Cpanel/ or $file eq $0;
            # do not want this noise
            #return if $file =~ /Cpanel\/Class/;
        }
        
        my $code;
        {
            no strict 'refs';
            $code = \@{"::_<$file"};
        }
        print $fh "[@{[time]}] $file $line $code->[$line]";
    }
};

1;