Skip to content

Commit f906d31

Browse files
authored
Release v1.000
Complete initial relase v1.000
1 parent 9597c3d commit f906d31

17 files changed

+756
-0
lines changed

Changes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Revision history for Debug-Comments
2+
3+
1.000 2025-08-23
4+
- Initial release
5+

MANIFEST

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Changes
2+
lib/Debug/Comments.pm
3+
Makefile.PL
4+
MANIFEST This list of files
5+
README
6+
README.md
7+
t/00-load.t
8+
t/01-basic.t
9+
t/02-prefix.t
10+
t/03-environment.t
11+
t/04-backticks.t
12+
t/lib/OutputSwapper.pm
13+
t/lib/TestHelper.pm
14+
t/manifest.t
15+
t/pod-coverage.t
16+
t/pod.t

MANIFEST.SKIP

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
^\.git/
2+
^\.gitignore$
3+
^MANIFEST.SKIP$
4+
~$
5+
^#
6+
^blib/
7+
^Makefile$
8+
^MYMETA\.
9+
^pm_to_blib

Makefile.PL

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
use 5.006;
2+
use strict;
3+
use warnings;
4+
use ExtUtils::MakeMaker;
5+
6+
my %WriteMakefileArgs = (
7+
NAME => 'Debug::Comments',
8+
AUTHOR => q{Brett Watson <brett.watson@gmail.com>},
9+
VERSION_FROM => 'lib/Debug/Comments.pm',
10+
ABSTRACT_FROM => 'lib/Debug/Comments.pm',
11+
LICENSE => 'perl_5',
12+
MIN_PERL_VERSION => '5.010',
13+
CONFIGURE_REQUIRES => {
14+
'ExtUtils::MakeMaker' => '0',
15+
},
16+
TEST_REQUIRES => {
17+
'File::Temp' => '0',
18+
'Test::More' => '0.99', # subtests
19+
},
20+
PREREQ_PM => {
21+
'Filter::Util::Call' => '0',
22+
},
23+
META_MERGE => {
24+
'meta-spec' => { version => 2 },
25+
resources => {
26+
repository => {
27+
type => 'git',
28+
url => 'https://github.com/TFBW/Debug-Comments.git',
29+
web => 'https://github.com/TFBW/Debug-Comments',
30+
},
31+
bugtracker => {
32+
web => 'https://github.com/TFBW/Debug-Comments/issues'
33+
},
34+
},
35+
},
36+
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
37+
clean => { FILES => 'Debug-Comments-*' },
38+
);
39+
40+
# Compatibility with old versions of ExtUtils::MakeMaker
41+
unless (eval { ExtUtils::MakeMaker->VERSION('6.64'); 1 }) {
42+
my $test_requires = delete $WriteMakefileArgs{TEST_REQUIRES} || {};
43+
@{$WriteMakefileArgs{PREREQ_PM}}{keys %$test_requires} = values %$test_requires;
44+
}
45+
46+
unless (eval { ExtUtils::MakeMaker->VERSION('6.55_03'); 1 }) {
47+
my $build_requires = delete $WriteMakefileArgs{BUILD_REQUIRES} || {};
48+
@{$WriteMakefileArgs{PREREQ_PM}}{keys %$build_requires} = values %$build_requires;
49+
}
50+
51+
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
52+
unless eval { ExtUtils::MakeMaker->VERSION('6.52'); 1 };
53+
delete $WriteMakefileArgs{MIN_PERL_VERSION}
54+
unless eval { ExtUtils::MakeMaker->VERSION('6.48'); 1 };
55+
delete $WriteMakefileArgs{LICENSE}
56+
unless eval { ExtUtils::MakeMaker->VERSION('6.31'); 1 };
57+
58+
WriteMakefile(%WriteMakefileArgs);

README

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Debug-Comments
2+
3+
Lightweight Perl source filter to generate debug-trace messages from
4+
comments.
5+
6+
7+
INSTALLATION
8+
9+
To install this module, run the following commands:
10+
11+
perl Makefile.PL
12+
make
13+
make test
14+
make install
15+
16+
17+
SUPPORT AND DOCUMENTATION
18+
19+
After installing, you can find documentation for this module with the
20+
perldoc command.
21+
22+
perldoc Debug::Comments
23+
24+
You can also look for information at:
25+
26+
RT, CPAN's request tracker (report bugs here)
27+
https://rt.cpan.org/NoAuth/Bugs.html?Dist=Debug-Comments
28+
29+
CPAN Ratings
30+
https://cpanratings.perl.org/d/Debug-Comments
31+
32+
Search CPAN
33+
https://metacpan.org/release/Debug-Comments
34+
35+
36+
LICENSE AND COPYRIGHT
37+
38+
This software is copyright (c) 2025 by Brett Watson.
39+
40+
This is free software; you can redistribute it and/or modify it under
41+
the same terms as the Perl 5 programming language system itself.
42+

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Debug::Comments
2+
3+
[![CPAN version](https://badge.fury.io/pl/Debug-Comments.svg)](https://metacpan.org/pod/Debug::Comments)
4+
[![License](https://img.shields.io/cpan/l/Debug-Comments)](https://metacpan.org/pod/Debug::Comments)
5+
6+
Perl source filter which turns comments into debug messages
7+
8+
This module is a minimalist Perl source filter which converts
9+
designated comments into debug trace messages printed via warn(). The
10+
behaviour is normally activated by an environment variable (e.g.
11+
"DEBUG") in a "use if" pragma. In the absence of the source filter,
12+
the comments are just comments, so using the module does not create a
13+
dependency on it except to the extent you want to run it with debug
14+
output.
15+
16+
## Synopsis
17+
18+
```perl
19+
use if $ENV{DEBUG}, 'Debug::Comments';
20+
#@! This is a debug message. DEBUG=$ENV{DEBUG}
21+
```
22+
23+
## Key Features
24+
25+
- **No cost when disabled** - Without the filter, debug messages are just comments
26+
- **Trace info** - Messages have a standard time/file/line prefix
27+
- **ANSI color** - Prefix is visually distinct if STDERR is a TTY (unless disabled)
28+
- **Configurable** - Env vars for controlling output
29+
30+
## Installation
31+
32+
```bash
33+
cpanm Debug::Comments
34+
```
35+
36+
## Requirements
37+
38+
- Perl 5.10+
39+
- Filter::Util::Call
40+
41+
## License
42+
43+
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
44+
45+
## Author
46+
47+
Brett Watson
48+
49+
## See Also
50+
51+
- [Smart::Comments](https://metacpan.org/pod/Smart::Comments) - Feature-rich alternative by Damian Conway
52+
- [Debug::Filter::PrintExpr](https://metacpan.org/pod/Debug::Filter::PrintExpr) - Alternative with a focus on data dumping

0 commit comments

Comments
 (0)