Package smart-comments-pm5100-1.0.4-1
| System | Binary Distributions | CVS/rsync Source Distributions | |
|---|---|---|---|
10.7/x86_64 | |||
10.6/x86_64 | |||
10.6/i386 | |||
10.5/i386 | |||
10.5/powerpc | 1.0.4-1 | ||
| Description: | Comments that do more than just sit there (1.0.4-1) | |
Smart comments provide an easy way to insert debugging and tracking code into
a program. They can report the value of a variable, track the progress of a
loop, and verify that particular assertions are true.
Best of all, when you're finished debugging, you don't have to remove them.
Simply commenting out the use Smart::Comments line turns them back into
regular comments. Leaving smart comments in your code is smart because if you
needed them once, you'll almost certainly need them again later. | ||
| Usage Hints: | ||
The module is loaded like any other:
use Smart::Comments;
When loaded it filters the remaining code up to the next:
no Smart::Comments;
directive, replacing any smart comments with smart code that implements the
comments behaviour.
If you're debugging an application you can also invoke it with the module from
the command-line:
perl -MSmart::Comments $application.pl
Of course, this only enables smart comments in the application file itself,
not in any modules that the application loads.
You can also specify particular levels of smartness, by including one or more
markers as arguments to the use:
use Smart::Comments '###', '####';
These arguments tell the module to filter only those comments that start with
the same number of #'s. So the above use statement would "activate" any smart
comments of the form:
### Smart...
#### Smarter...
but not those of the form:
##### Smartest...
This facility is useful for differentiating progress bars (see "Progress
Bars"), which should always be active, from debugging comments (see "Debugging
via Comments"), which should not:
#### Debugging here...
for (@values) { ### Progress: 0... 100
do_stuff();
}
Note that, for simplicity, all smart comments described below will be written
with three #'s; in all such cases, any number of #'s greater than three could
be used instead.
For more detailed documentation, `perldoc Smart::Comments`. | ||
| Section: | libs/perlmods | |
| Maintainer: | Steve Huff <hakamadareATusersDOTsourceforgeDOTnet> | |
| Website: | http://search.cpan.org/dist/Smart-Comments/ | |
| License: | Artistic | |
| Info-File: | dists/10.4/stable/main/finkinfo/libs/perlmods/smart-comments-pm.info CVS log, Last Changed: Sun, 08 Jan 2012 09:38:54 (UTC) | |
Section list - Flat package list - Search packages
(*) = Unsupported distribution.