HomePhorge

(#11451) Fix improper use of "defined" in the duplicate declaration error
4f295f3b57c7Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#11451) Fix improper use of "defined" in the duplicate declaration error

Duplicate resource declarations (including classes with the resource-like
class {'name':} syntax) were provoking the following error:

Duplicate definition: Class[Test] is already defined in file /tmp/test.pp at
line 9; cannot redefine at /tmp/test.pp:10 on node example.com

This is incorrect -- the problem is a duplicate declaration, not a duplicate
definition. I believe this is a holdover from our formerly sloppy use of the two
terms.

This commit fixes the error message, and renames several variables and methods
to match our current understanding of the terms "define" and "declare." Tests
are fixed as well.

Details

Provenance
nfagerlund <nick.fagerlund@gmail.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUac8b408e1839: Merge branch '2.6.x' into 2.7.x
Branches
Unknown
Tags
Unknown

Event Timeline

nfagerlund <nick.fagerlund@gmail.com> committed rPU4f295f3b57c7: (#11451) Fix improper use of "defined" in the duplicate declaration error (authored by nfagerlund <nick.fagerlund@gmail.com>).Jan 4 2012, 12:14 AM