[m-dev.] for review: enhancements to mtags script

Andrew Bromage bromage at cs.mu.OZ.AU
Tue Jul 7 17:07:05 AEST 1998


G'day.

You (Peter Schachte) wrote:

> Just be careful that $_ isn't used implicitly below.

I did check this before I mentioned this.  All of the instances of
this this pattern were at the bottom of loops or within the body of
an if, which means that if $_ was used implicitly, the code deserves
to break. :-)

> You may object to the style of it,

I objected in this case.  Not only did it save a line, it's a lot
more readable.

> Particularly if you're doing much
> pattern matching.  When I quickly read over your perl script I thought that
> some of it could be streamlined by using $_, but then decided not to mention
> it. 

I did notice this too.  Some of the long chains of expressions such as:

	next unless (
		something ||
		$body =~ /--->/ ||
		$body =~ /=/ ||
		$body =~ /::/
	);

would look a bit neater using $_ instead.

Neither brevity nor streamlining are really huge concerns for mtags.
Now maybe if we'd written mdemangle in Perl...

Cheers,
Andrew Bromage



More information about the developers mailing list