[Puppet-dev] Puppet Setting Deprecation

2014-09-04 Thread Nan Liu
I have some code that's doing module searching in the module path: example = Puppet::Module.find('example', Puppet[:environment].to_s) raise(LoadError, Unable to find example module in modulepath #{Puppet[:modulepath]}) unless example In Puppet 3.6, the second line is triggering a the

Re: [Puppet-dev] Puppet Setting Deprecation

2014-09-04 Thread Trevor Vaughan
I think it's Puppet[:basemodulepath] but this needs to be combined with your environment path search. Trevor On Thu, Sep 4, 2014 at 1:03 PM, Nan Liu nan@gmail.com wrote: I have some code that's doing module searching in the module path: example = Puppet::Module.find('example',

Re: [Puppet-dev] Puppet Setting Deprecation

2014-09-04 Thread Joshua Partlow
Hi Nan, The modulepath is really only meaningful from an actual environment instance. What code are you writing? You'll probably want to lookup the current environment or make use of the environment instance available in your local context (if there is one). On Thu, Sep 4, 2014 at 10:08 AM,

Re: [Puppet-dev] Puppet Setting Deprecation

2014-09-04 Thread Nan Liu
Yes, I'm looking for the environment specific modulepath. Maybe this is a more complete example: example = Puppet::Module.find('example', Puppet[:environment].to_s) raise(LoadError, Unable to find example module in modulepath #{Puppet[:modulepath]}) unless example

Re: [Puppet-dev] Puppet Setting Deprecation

2014-09-04 Thread Joshua Partlow
On Thu, Sep 4, 2014 at 12:34 PM, Nan Liu nan@gmail.com wrote: Yes, I'm looking for the environment specific modulepath. Maybe this is a more complete example: example = Puppet::Module.find('example', Puppet[:environment].to_s) raise(LoadError, Unable to find example module in modulepath

Re: [Puppet-dev] Puppet Setting Deprecation

2014-09-04 Thread Andy Parker
On Thu, Sep 4, 2014 at 1:05 PM, Joshua Partlow joshua.part...@puppetlabs.com wrote: On Thu, Sep 4, 2014 at 12:34 PM, Nan Liu nan@gmail.com wrote: Yes, I'm looking for the environment specific modulepath. Maybe this is a more complete example: example = Puppet::Module.find('example',

Re: [Puppet-dev] Puppet Setting Deprecation

2014-09-04 Thread Nan Liu
On Thu, Sep 4, 2014 at 1:14 PM, Andy Parker a...@puppetlabs.com wrote: On Thu, Sep 4, 2014 at 1:05 PM, Joshua Partlow joshua.part...@puppetlabs.com wrote: On Thu, Sep 4, 2014 at 12:34 PM, Nan Liu nan@gmail.com wrote: Yes, I'm looking for the environment specific modulepath. Maybe