Item Description: Allows multi-line comments which are filtered out.
Review Synopsis:
CPAN LINK: Acme::Comment
CPAN ABSTRACT: This module allows for multi-line comments which are filtered out. Unlike the pseudo multi-line comment if (0) {}, the code being commented.
Introduction:
Roaming about the monastery I came upon the following node:
Block Commenting, a fellow monk essentially searching for advise on the possibilty of multi-line commenting. A few replies down mentioned in passing the module Acme::Comment, it's claim was to allow multi-line comments which are filtered out. I became curious so I downloaded the module and checked it out for myself.
Functionality:
Acme::Comment, in a nutshell, allows for multi-line and single line commenting in several different language styles. Some of the multi-line comment language styles are: C++, HTML, Pascal and Java to name a few. In total, both single and multi line together there were a total of 43
different programming languages represented. I tested it out in "HTML" mode
using multi-line comments with ActivePerl 5.8.0 on WinXP,
and it proved to be quite easy to use. The distribution itself contains fairly straight forward documentation.
Generic Example:
Final Thoughts:#!/usr/bin/perl -w use strict; use Acme::Comment type=>'HTML'; <!-- Multi-line comments here. Everything enclosed in the html style comment braces is ignored. --> my $a=1; my $b=2; my $c=$a + $b; print "$a + $b = $c\n";
For implementation of multi-line comments in various language formats I found this module to be quite useful. The only drawback that I can immediately see is that this module is not yet widely known. I think multi-line commenting (a single format of) would be great implemented as a standard feature in a future version of Perl; perhaps in Perl6? (it can't hurt to hope)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Acme::Comment -- Module Review
by Abigail-II (Bishop) on Nov 06, 2003 at 11:50 UTC | |
by tye (Sage) on Nov 06, 2003 at 15:59 UTC | |
by Abigail-II (Bishop) on Nov 06, 2003 at 16:26 UTC | |
Re: Acme::Comment -- Module Review
by jweed (Chaplain) on Nov 07, 2003 at 02:05 UTC | |
by Aristotle (Chancellor) on Nov 09, 2003 at 12:55 UTC | |
by wazoox (Prior) on Apr 15, 2005 at 23:22 UTC |