Eval::LineNumbers - Add line numbers to heredoc blocks that contain perl source code
use Eval::LineNumbers qw(eval_line_numbes); eval eval_line_numbers(<<END_HEREIS); code END_HEREIS
Add a #line "this-file" 392 comment to heredoc/hereis text that is going to be eval'ed so that error messages will point back to the right place.
#line "this-file" 392
Please note: when you embed \n in your code, it gets expanded in double-quote hereis documents so it will mess up your line numbering. Use \\n instead when you can.
\n
\\n
Copyright (C) 2009 David Muir Sharnoff. Copyright (C) 2013 Google, Inc.
This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.
To install Eval::LineNumbers, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eval::LineNumbers
CPAN shell
perl -MCPAN -e shell install Eval::LineNumbers
For more information on module installation, please visit the detailed CPAN module installation guide.