Syntax::Feature::Qi - Remove the same indendation from all lines in a string
Version 1.0000, released 2016-04-16.
use syntax 'qi'; say qi{ This is a sub routine: sub printme { print shift; } }; # is exactly the same as say qi{ This is a sub routine: sub printme { print shift; } };
This is a syntax extension to be used with syntax.
It provides two quote-like operators, qi and qqi. They are drop-in replacements for q and qq, respectively.
qi
qqi
q
qq
They work like this: First they find the first line in the string with a non-white space character. It saves the white space from the beginning of that line up to that character, and then it tries to remove the exact same whitespace from all other lines in the string.
Syntax::Feature::Ql (which served as a base for this)
Syntax::Feature::Qs
String::Nudge
syntax
https://github.com/Csson/p5-Syntax-Feature-Qi
https://metacpan.org/release/Syntax-Feature-Qi
Erik Carlsson <info@code301.com>
This software is copyright (c) 2016 by Erik Carlsson.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Syntax::Feature::Qi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Syntax::Feature::Qi
CPAN shell
perl -MCPAN -e shell install Syntax::Feature::Qi
For more information on module installation, please visit the detailed CPAN module installation guide.