Server IP : 103.119.228.120 / Your IP : 18.224.63.123 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/ssl/local/ssl/local/ssl/local/ssl/local/ssl/lib64/perl5/B/ |
Upload File : |
package B::Terse; our $VERSION = '1.06'; use strict; use B qw(class @specialsv_name); use B::Concise qw(concise_subref set_style_standard); use Carp; sub terse { my ($order, $subref) = @_; set_style_standard("terse"); if ($order eq "exec") { concise_subref('exec', $subref); } else { concise_subref('basic', $subref); } } sub compile { my @args = @_; my $order = @args ? shift(@args) : ""; $order = "-exec" if $order eq "exec"; unshift @args, $order if $order ne ""; B::Concise::compile("-terse", @args); } sub indent { my ($level) = @_ ? shift : 0; return " " x $level; } # Don't use this, at least on OPs in subroutines: it has no way of # getting to the pad, and will give wrong answers or crash. sub B::OP::terse { carp "B::OP::terse is deprecated; use B::Concise instead"; B::Concise::b_terse(@_); } sub B::SV::terse { my($sv, $level) = (@_, 0); my %info; B::Concise::concise_sv($sv, \%info); my $s = indent($level) . B::Concise::fmt_line(\%info, $sv, "#svclass~(?((#svaddr))?)~#svval", 0); chomp $s; print "$s\n" unless defined wantarray; $s; } sub B::NULL::terse { my ($sv, $level) = (@_, 0); my $s = indent($level) . sprintf "%s (0x%lx)", class($sv), $$sv; print "$s\n" unless defined wantarray; $s; } sub B::SPECIAL::terse { my ($sv, $level) = (@_, 0); my $s = indent($level) . sprintf( "%s #%d %s", class($sv), $$sv, $specialsv_name[$$sv]); print "$s\n" unless defined wantarray; $s; } 1; __END__ =head1 NAME B::Terse - Walk Perl syntax tree, printing terse info about ops =head1 SYNOPSIS perl -MO=Terse[,OPTIONS] foo.pl =head1 DESCRIPTION This module prints the contents of the parse tree, but without as much information as L<B::Debug>. For comparison, C<print "Hello, world."> produced 96 lines of output from B::Debug, but only 6 from B::Terse. This module is useful for people who are writing their own back end, or who are learning about the Perl internals. It's not useful to the average programmer. This version of B::Terse is really just a wrapper that calls L<B::Concise> with the B<-terse> option. It is provided for compatibility with old scripts (and habits) but using B::Concise directly is now recommended instead. For compatibility with the old B::Terse, this module also adds a method named C<terse> to B::OP and B::SV objects. The B::SV method is largely compatible with the old one, though authors of new software might be advised to choose a more user-friendly output format. The B::OP C<terse> method, however, doesn't work well. Since B::Terse was first written, much more information in OPs has migrated to the scratchpad datastructure, but the C<terse> interface doesn't have any way of getting to the correct pad. As a kludge, the new version will always use the pad for the main program, but for OPs in subroutines this will give the wrong answer or crash. =head1 AUTHOR The original version of B::Terse was written by Malcolm Beattie, E<lt>mbeattie@sable.ox.ac.ukE<gt>. This wrapper was written by Stephen McCamant, E<lt>smcc@MIT.EDUE<gt>. =cut