<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Perl::LineNumber::Comment - Add line number to Perl source as comment

VERSION
    This document describes version 0.002 of Perl::LineNumber::Comment (from
    Perl distribution Perl-LineNumber-Comment), released on 2020-11-28.

SYNOPSIS
    In your code:

     use File::Slurper qw(read_text);
     use Perl::LineNumber::Comment qw(add_line_number_comments_to_perl_source);

     my $source = read_text('sample.pl');
     print add_line_number_comments_to_perl_source(source =&gt; $source);

    Content of sample.pl:

     #!/usr/bin/env perl

     use 5.010001;
     use strict;
     use warnings;

     print "Hello, world 1!";
     print "Hello, world 2!";                   # a comment
     print "A multiline
     string";

     print &lt;&lt;EOF;
     A heredoc (not shown in node-&gt;content).

     Line three.
     EOF

     exit 0;

     __END__
     one
     two
     three

    Output of code:

     #!/usr/bin/env perl

     use 5.010001;
     use strict;
     use warnings; # line 5

     print "Hello, world 1!";
     print "Hello, world 2!";                   # a comment
     print "A multiline
     string"; # line 10

     print &lt;&lt;EOF;

     exit 0;

     __END__
     one
     two
     three

FUNCTIONS
  add_line_number_comments_to_perl_source
    Usage:

     add_line_number_comments_to_perl_source(%args) -&gt; any

    This function is not exported.

    Arguments ('*' denotes required arguments):

    *   column =&gt; *posint* (default: 80)

        Currently not implemented

    *   every =&gt; *posint* (default: 5)

    *   format =&gt; *str* (default: " # line %d")

    *   source* =&gt; *str*

    Return value: (any)

HOMEPAGE
    Please visit the project's homepage at
    &lt;https://metacpan.org/release/Perl-LineNumber-Comment&gt;.

SOURCE
    Source repository is at
    &lt;https://github.com/perlancar/perl-Perl-LineNumber-Comment&gt;.

BUGS
    Please report any bugs or feature requests on the bugtracker website
    &lt;https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-LineNumber-Comme
    nt&gt;

    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
AUTHOR
    perlancar &lt;perlancar@cpan.org&gt;

COPYRIGHT AND LICENSE
    This software is copyright (c) 2020 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.

</pre></body></html>