class myclass($api_key=$myclass::params::myclassagent_APIkey) inherits myclass::params{
include myclass::params
some code here...
}include myclass
And to make autoloading work :
...modules/myclass/init.pp
/params.pp
On 11/21/2013 12:17 PM, Raj kumar V wrote:
> In my module folder, <module/mymodule>
>
> I have 2 files.
>
> init.pp
> params.pp
>
> My init code:
>
> class myclass($api_key=$myclass::params::myclassagent_APIkey) inherits
> myclass::params{
No need to inherit the params class. I would get rid of that first.
> include myclass::params
This is likely needed, although I'm not sure wether
$myclass::params::myclassagent_APIkey will already be available when
puppet encounters the class declaration header.
> some code here...
>
> }include myclass