From c3caa09d922a34301c99871593a785495055fc64 Mon Sep 17 00:00:00 2001 From: Stephen McCamant Date: Fri, 12 Jan 2001 13:45:17 -0800 Subject: [PATCH] Re: B::Concise -- an improved replacement for B::Terse Message-ID: <14943.59712.993695.180189@soda.csua.berkeley.edu> p4raw-id: //depot/perl@8431 --- ext/B/B/Concise.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm index 9f53955..cc894d3 100644 --- a/ext/B/B/Concise.pm +++ b/ext/B/B/Concise.pm @@ -3,15 +3,15 @@ package B::Concise; # This program is free software; you can redistribute and/or modify it # under the same terms as Perl itself. -our $VERSION = "0.50"; +our $VERSION = "0.51"; use strict; use B qw(class ppname main_start main_root main_cv cstring svref_2object SVf_IOK SVf_NOK SVf_POK OPf_KIDS); my %style = ("terse" => - ["(?(#label =>\n)?)(*( )*)#class (#addr) pp_#name " - . "(?([#targ])?) #svclass~(?((#svaddr))?)~#svval\n", + ["(?(#label =>\n)?)(*( )*)#class (#addr) #name (?([#targ])?) " + . "#svclass~(?((#svaddr))?)~#svval~(?(label \"#coplabel\")?)\n", "(*( )*)goto #class (#addr)\n", "#class pp_#name"], "concise" => @@ -352,6 +352,7 @@ sub concise_op { $h{svval} = '"' . $op->pv . '"'; } elsif ($h{class} eq "COP") { my $label = $op->label; + $h{coplabel} = $label; $label = $label ? "$label: " : ""; my $loc = $op->file; $loc =~ s[.*/][]; @@ -667,6 +668,10 @@ The B-determined class of the OP, in all caps. A single symbol abbreviating the class of the OP. +=item B<#coplabel> + +The label of the statement or block the OP is the start of, if any. + =item B<#exname> The name of the OP, or 'ex-foo' if the OP is a null that used to be a foo. -- 2.7.4