diff options
author | Luke Kanies <luke@puppetlabs.com> | 2010-06-10 19:21:05 -0700 |
---|---|---|
committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
commit | 50a626daa1bef956ea63c405fddeaeab8a9a0756 (patch) | |
tree | 88a8fcf4ed68351a85935cef65a938a97c5513aa /spec/unit/util/autoload.rb | |
parent | 5d1934bbb118c254ed99f5a625844ad7c9064d8e (diff) | |
download | puppet-50a626daa1bef956ea63c405fddeaeab8a9a0756.tar.gz puppet-50a626daa1bef956ea63c405fddeaeab8a9a0756.tar.xz puppet-50a626daa1bef956ea63c405fddeaeab8a9a0756.zip |
Fixing #1545 - Adding 'caller_module_name' variable
This will produce the name of the module that a given
resource is defined in, rather than the module that
the resource type itself is defined in. For instance:
# in one/manifests/onedef.pp
define one::onedef {
notice "Called $name from $caller_module_name"
}
# in two/manifests/init.pp
class two {
one::onedef { yay: }
}
produces:
Called yay from two
This could obviously be extended to actually build a caller
stack, as frightening as that seems.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'spec/unit/util/autoload.rb')
0 files changed, 0 insertions, 0 deletions