develooper Front page | perl.perl5.porters | Postings from January 2001

Re: B::Concise -- an improved replacement for B::Terse

Thread Previous
From:
Stephen McCamant
Date:
January 10, 2001 14:56
Subject:
Re: B::Concise -- an improved replacement for B::Terse
Message ID:
14940.59333.61525.735260@soda.csua.berkeley.edu
>>>>> "DC" == Daniel Chetlin <daniel@chetlin.com> writes:

DC> On Sat, Jan 06, 2001 at 08:18:05PM -0800, Stephen McCamant wrote:
SMcC> After playing with this as my own personal toy for a while, I
SMcC> thought other people might find it useful, and I finally got
SMcC> around to adding command line options and a little
SMcC> documentation. What I'm wondering now is whether this should go
SMcC> in the core (to either supplement or replace B::Terse) or
SMcC> whether it should go on CPAN.

DC> From what I saw in your note, I would consider this to be extremely
DC> useful, having struggled with B::Terse recently. It is indeed
DC> frustrating to not be given access to the flags.

DC> I would push for its inclusion in the core, and suggest that Terse be
DC> reimplemented in terms of it for backwards compatibility.

Easy enough.

 -- Stephen McC

--- snip ---
package B::Terse;
use B::Concise;

sub compile {
    my @args = @_;
    $args[0] = "-exec" if $args[0] eq "exec";
    unshift @args, "-terse";
    B::Concise::compile(@args);
}

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 version of B::Terse is really just a wrapper that calls 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.

=head1 AUTHOR

The original version of B::Terse was written by Malcolm Beattie,
C<mbeattie@sable.ox.ac.uk>. This wrapper was written by Stephen McCamant,
C<smcc@CSUA.Berkeley.EDU>.

=cut
--- snip ---

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About