HomePhorge

Implement newlookupvar() to replace dynamic scope
2e78aad2a3f2Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Implement newlookupvar() to replace dynamic scope

lookupvar() is shifted to oldlookupvar() and newlookupvar() is added. An
intermediary lookupvar() function will query both and if the answer
varies then it will throw a deprecation warning for dynamic scoping. The
intermediary and old lookup functions may be removed at a later date,
thus completing the transition.

A test case has been introduced to detect dynamic scoping and the
deprecation warning. Slight modifications to the spec test scoping
objects were made to bring them more in line with the real world.

All scope tests pass. When oldlookupvar is replaced, the deprecated
dynamic scoping test case will fail and all other scope test cases will
pass.

Details

Provenance
Hunter Haugen <h.haugen@gmail.com>Authored on
Andrew Parker <andy@puppetlabs.com>Committed on Apr 11 2012, 10:03 PM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU9c9458668bc9: Tests for deprecation warnings for dynamic scoping
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU2e78aad2a3f2: Implement newlookupvar() to replace dynamic scope (authored by Hunter Haugen <h.haugen@gmail.com>).Apr 11 2012, 10:03 PM