Issue #7529 has been updated by Nigel Kersten.

Although Augeas is the most common place I've hit this problem, I've also run 
into it with Execs where you also need to pass literal quotes.
----------------------------------------
Feature #7529: Support alternative quotes for string literals
https://projects.puppetlabs.com/issues/7529

Author: Dominic Cleal
Status: Needs Decision
Priority: Normal
Assignee: Nigel Kersten
Category: language
Target version: 
Affected Puppet version: 
Keywords: language quoting
Branch: 


Quoting can be an issue with Augeas resources, where strings in commands are 
quoted but the value itself has to contain quotes.  For example, to set the 
value of a node to "bar" (with the quotes), one might do:

    augeas { "myaug":
      changes => "set Foo[. = '\"$bar\"'] '\"$bar\"'"
    }

If the DSL supported some alternative method of quoting, such as [Perl's q{} 
and/or qq{}](http://perldoc.perl.org/perlop.html#Quote-Like-Operators) or 
[Ruby's %q and 
%Q](http://en.wikibooks.org/wiki/Ruby_Programming/Alternate_quotes), we could 
lose a level of escaping.

Perhaps the above example could then be improved to read:

    augeas { "myaug":
      changes => %Q(set Foo[. = '"$bar"'] '"$bar"')
    }


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to