puppetlabs/puppet — pull request #3052 by hlindberg (2014-09-04 23:56:22+00:00)
Title: (PUP-3177) Remove magic handling of square brackets in resource title

The Resource handles square brackets in a resource title as
if it is a complete resource reference. This behavior is there
to support the component resource type, and whits. The implementation
however did not check if a regular type was also given.

This means that any resource with square brackets in its title either
leads to an error, or to the creation of an instance of different
type/title than what was intended.

This commit fixes this by only doing the munging of the title if the
type is nil, component or a whit.