{"comment":{"created_at":"2011-10-24T15:20:48Z","body":"If I have understood it correctly, $name and $title are always available in the current scope - as something is always evaluated in a scope that has these (read notes it will be something like \"main\" if not being someplace else).\r\n\r\nI think a simple implementation is to:\r\n* assume that $name and $title always exist as local variables.\r\n* all meta parameters exists as local variables in the scope of every define\r\n\r\nThese are not seen from the outside - i.e. they are not addressable with fully qualified names.\r\n","updated_at":"2011-10-24T15:20:48Z","url":"https://api.github.com/repos/cloudsmith/geppetto/issues/comments/2504745","id":2504745,"user":{"avatar_url":"https://secure.gravatar.com/avatar/3158c969e5c43e681b03abe4c8d0b33c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"3158c969e5c43e681b03abe4c8d0b33c","url":"https://api.github.com/users/hlindberg","id":563066,"login":"hlindberg"}},"action":"created","issue":{"number":210,"created_at":"2011-10-19T14:30:19Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"As reported in #202.\r\n\r\nIt seems Geppetto wants to autocorrect resource names/titles to be in the global scope, for example with the following code:\r\n\r\n    class myclass\r\n    {\r\n    \tdefine mymethod( $variable )\r\n    \t{\r\n    \t\tfile { \"puppet:///${name}\" }\r\n    \t}\r\n    }\r\n\r\nWhich would be used like this:\r\n\r\n    myclass::mymethod{ 'titlehere': variable => \"foo\" }\r\n\r\nThe $name value is the resource title of 'titlehere', but Geppetto would like to autocorrect this to $::name.","comments":7,"title":"Handle variables that represent resource parameters","updated_at":"2011-10-24T15:20:48Z","url":"https://api.github.com/repos/cloudsmith/geppetto/issues/210","id":1994418,"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/3158c969e5c43e681b03abe4c8d0b33c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"3158c969e5c43e681b03abe4c8d0b33c","url":"https://api.github.com/users/hlindberg","id":563066,"login":"hlindberg"},"milestone":{"number":9,"created_at":"2011-09-18T21:54:31Z","due_on":null,"title":"2.1","creator":{"avatar_url":"https://secure.gravatar.com/avatar/3158c969e5c43e681b03abe4c8d0b33c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"3158c969e5c43e681b03abe4c8d0b33c","url":"https://api.github.com/users/hlindberg","id":563066,"login":"hlindberg"},"url":"https://api.github.com/repos/cloudsmith/geppetto/milestones/9","open_issues":12,"closed_issues":9,"description":"","state":"open"},"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/3158c969e5c43e681b03abe4c8d0b33c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"3158c969e5c43e681b03abe4c8d0b33c","url":"https://api.github.com/users/hlindberg","id":563066,"login":"hlindberg"},"html_url":"https://github.com/cloudsmith/geppetto/issues/210","labels":[{"name":"puppet-help-needed","url":"https://api.github.com/repos/cloudsmith/geppetto/labels/puppet-help-needed","color":"ab5b4b"}],"state":"open"},"legacy":{"issue_id":1994418,"comment_id":2504745}}