Hi, I create a module call "MyModule". Then if I try to include a class in that module : include MyModule::myClass This doesn''t works if I don''t import the module first. BUT If my module is called my_module (in lower case), that works. I don''t see anywhere in the puppet documentation where there is a restriction in the module name. Do I make a mistake somewhere ? Or could you add this in the documentation ? Benoit --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 11, 2009, at 4:42 AM, Benoit Decherf wrote:> > Hi, > > I create a module call "MyModule". > > Then if I try to include a class in that module : > include MyModule::myClass > This doesn''t works if I don''t import the module first. > > BUT If my module is called my_module (in lower case), that works. I > don''t see anywhere in the puppet documentation where there is a > restriction in the module name. Do I make a mistake somewhere ? Or > could > you add this in the documentation ?Yeah, class names need to be lower-case, and I guess module names do, too. Can you file this as a bug? -- The Ninety-Ninety Rule of Project Schedules: The first 90% of the task takes 90% of the time, and the last 10% takes the other 90%. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 11, 2009, at 4:42 AM, Benoit Decherf wrote:> > Hi, > > I create a module call "MyModule". > > Then if I try to include a class in that module : > include MyModule::myClass > This doesn''t works if I don''t import the module first. > > BUT If my module is called my_module (in lower case), that works. I > don''t see anywhere in the puppet documentation where there is a > restriction in the module name. Do I make a mistake somewhere ? Or > could > you add this in the documentation ?That is, that it''s not documented is a bug. -- Kai''s Example Dilemma: A good analogy is like a diagonal frog. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Which characters are allowed in the class name and module name ? Is the "-" allowed ? I create the bug 1960 for this. Benoit On 02/11/2009 06:02 PM, Luke Kanies wrote:> On Feb 11, 2009, at 4:42 AM, Benoit Decherf wrote: > > >> Hi, >> >> I create a module call "MyModule". >> >> Then if I try to include a class in that module : >> include MyModule::myClass >> This doesn''t works if I don''t import the module first. >> >> BUT If my module is called my_module (in lower case), that works. I >> don''t see anywhere in the puppet documentation where there is a >> restriction in the module name. Do I make a mistake somewhere ? Or >> could >> you add this in the documentation ? >> > > That is, that it''s not documented is a bug. > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Just so you know, it looks like pretty much everything has to start lower case or Ruby/Puppet tries to interpret it as something else. I.e. variables, class names, node names, etc... Also, try really hard not to use a variable name that is the same as a Ruby built_in. Does anyone have a best practice for this? Trevor On Thu, Feb 12, 2009 at 04:41, Benoit Decherf <decherfb@yahoo-inc.com> wrote:> Which characters are allowed in the class name and module name ? > Is the "-" allowed ? > > I create the bug 1960 for this. > > Benoit > > > > On 02/11/2009 06:02 PM, Luke Kanies wrote: > > On Feb 11, 2009, at 4:42 AM, Benoit Decherf wrote: > > > > Hi, > > I create a module call "MyModule". > > Then if I try to include a class in that module : > include MyModule::myClass > This doesn''t works if I don''t import the module first. > > BUT If my module is called my_module (in lower case), that works. I > don''t see anywhere in the puppet documentation where there is a > restriction in the module name. Do I make a mistake somewhere ? Or > could > you add this in the documentation ? > > > That is, that it''s not documented is a bug. > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---