Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added readme

  • Loading branch information...
commit 76e67f47172e67bee6cfbe56f0d07d0087d0cae5 1 parent 1a6eb3c
@phaylon authored
Showing with 90 additions and 0 deletions.
  1. +90 −0 README.pod
View
90 README.pod
@@ -0,0 +1,90 @@
+=pod
+
+=encoding utf-8
+
+=head1 NAME
+
+Syntax::Feature::Ql - Turns the quoted string into a single line
+
+=head1 VERSION
+
+version 0.001000
+
+=head1 SYNOPSIS
+
+ use syntax qw( ql );
+
+ # prints on one line
+ say ql{
+ Do you know the feeling when you want to generate a long
+ string for a message without having to concatenate or end
+ up with newlines and indentation?
+ };
+
+=head1 DESCRIPTION
+
+This is a syntax extension feature suitable for L<syntax>.
+
+It provides two new quote-like operators named C<ql> and C<qql>. These
+work in the same way as C<q> and C<qq> (including the ability to change
+the delimiters), except they put the returned string on a single line.
+
+The following all output C<foo bar baz>:
+
+ # simple
+ say ql{foo bar baz};
+
+ # multiline
+ say ql{
+ foo
+ bar
+ baz
+ };
+
+ # different delimiters and interpolation
+ my $qux = q{ # <- this is a normal quote!
+ bar
+ baz
+ };
+ say qql!
+ foo
+ $qux
+ !;
+
+As you can see with the last example, interpolated values are also
+normalized to fit on the single line.
+
+=head1 METHODS
+
+=head2 install
+
+ Syntax::Feature::Ql->install( into => $target );
+
+Installs the C<ql> and C<qql> operators into the C<$target>.
+
+=head1 SEE ALSO
+
+=over
+
+=item * L<syntax>
+
+=item * L<perlop>
+
+=back
+
+=head1 BUGS
+
+Please report any bugs or feature requests to bug-syntax-feature-ql@rt.cpan.org or through the web interface at:
+ http://rt.cpan.org/Public/Dist/Display.html?Name=Syntax-Feature-Ql
+
+=head1 AUTHOR
+
+Robert 'phaylon' Sedlacek <rs@474.at>
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is copyright (c) 2011 by Robert 'phaylon' Sedlacek.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
Please sign in to comment.
Something went wrong with that request. Please try again.