NAME

Quote::Code - quoted strings with arbitrary code interpolation

SYNOPSIS

use Quote::Code;
print qc"2 + 2 = {2 + 2}";  # "2 + 2 is 4"
my $msg = qc{The {$obj->name()} is {$obj->state()}.};

DESCRIPTION

This module provides the new keyword qc. qc is a quoting operator like q or qq. It works like q in that it doesn't interpolate $foo or @foo, and like qq in that it does recognize backslash escapes such as \n, \xff, etc.

What it adds is the ability to embed arbitrary expressions in braces ({...}). This is both more readable and more efficient than the old "foo @{[bar]}" trick.

BUGS

It doesn't understand \N{...}.

AUTHOR

Lukas Mai, <l.mai at web.de>

COPYRIGHT & LICENSE

Copyright 2012 Lukas Mai.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.