summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen McCamant <smcc@mit.edu>2001-01-12 13:45:17 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-13 05:55:55 +0000
commitc3caa09d922a34301c99871593a785495055fc64 (patch)
treead30c2c0497e62d7fa691f90fc3c5550d34afaf1
parentbee2ec04fc994b89da41b7d4b998da6c19459895 (diff)
downloadperl-c3caa09d922a34301c99871593a785495055fc64.tar.gz
Re: B::Concise -- an improved replacement for B::Terse
Message-ID: <14943.59712.993695.180189@soda.csua.berkeley.edu> p4raw-id: //depot/perl@8431
-rw-r--r--ext/B/B/Concise.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm
index 9f539554e1..cc894d325f 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.