Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.6-rc-2
-
None
-
None
Description
not sure if it is technically doable. but allowing parameter name with hyphen will help a lot to Grails Config.groovy
for one of my use cases, i have a Grails PHP Plugin that allow user to specify some servlet init-param. Ideally, the parameter name shall be identical to the original parameter name used by the underlying PHP Servlet. one of the name that i have failed to use is 'ini-file'.
for ConfigSlurperTest
public void testNodeKeyWithHyphen(){ println "testNodeKeyWithHyphen" def slurper = new ConfigSlurper() def config = slurper.parse(''' init-param{ param-name = 'foo' param-value = 'bar' } ''') assert config assertNotNull config.'init-param' assertFalse config.'init-param' instanceof ConfigObject assertEquals 'foo',config.'init-param'.'param-name' }
also refer to:
http://www.nabble.com/get-a-closure-from-ConfigObject-tp21738767p21823548.html