Created
April 23, 2011 16:42
-
-
Save kwilczynski/938766 to your computer and use it in GitHub Desktop.
Testing array indices accessor for use winitn Puppet manifest ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
krzysztof@samsung ~/Sandbox $ cat - | LOAD_PATH=. FACTERLIB=. puppet | |
define iterator { | |
notice $name | |
} | |
$array = ['a', 'b', 'c', 'd'] | |
$result = collect_indices($array, 1, 3, 2, 10) | |
notice $result | |
iterator { $result: } | |
notice: Scope(Class[main]): b d c | |
notice: Scope(Iterator[b]): b | |
notice: Scope(Iterator[d]): d | |
notice: Scope(Iterator[c]): c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment