The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dist::Zilla::Plugin::Comment - Comment-out lines or blocks of lines

VERSION

This document describes version 0.02 of Dist::Zilla::Plugin::Comment (from Perl distribution Dist-Zilla-Plugin-Comment), released on 2016-12-25.

SYNOPSIS

In dist.ini:

 [Comment]

In lib/Foo.pm:

 ...

 do_something(); # COMMENT

 # BEGIN_COMMENT
 one();
 two();
 three();
 # END_COMMENT

 =pod

 =for BEGIN_COMMENT

 blah
 blah
 blah

 =for END_COMMENT

 ...

After build, lib/Foo.pm will become:

 ...

 ## do_something(); # COMMENT

 # BEGIN_COMMENT
 ## one();
 ## two();
 ## three();
 # END_COMMENT

 =pod

 =for BEGIN_COMMENT

 ## blah
 ## blah
 ## blah

 =for END_COMMENT

 ...

DESCRIPTION

This plugin finds lines that end with # COMMENT, or blocks of lines delimited by # BEGIN COMMENT ... # END_COMMENT or =for BEGIN_COMMENT ... =end END_COMMENT and comment them out.

This can be used, e.g. to do stuffs only when the source file is not the dzil-built version, usually for testing.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Dist-Zilla-Plugin-Comment.

SOURCE

Source repository is at https://github.com/perlancar/perl-Dist-Zilla-Plugin-Comment.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Plugin-Comment

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

You can use this plugin in conjunction with Dist::Zilla::Plugin::InsertBlock. DZP:InsertBlock can insert lines that will only be available in the dzil-built version. While for the raw version, you can use DZP:Comment plugin to make lines that will be commented-out in the dzil-built version.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.