On Jan 16, 2007, at 6:26 PM, Luke Kanies wrote:
> I'd *much* prefer to just write:
>
> module Puppet::OSAL::Type::User
> end
>
> But if I do that, then I'll always have to specify the full class  
> path.

Can you group all the constants in a module?  Something like this:

module Puppet

   module Constants
     Constant1 = 42
     Constant2 = Constant1 * 42
   end

   module OSAL			
     module Type
     end
   end

   class OSAL::Type::User
     include Constants		# Now the constants can be used unqualified

     puts Constant1
   end

   class OSAL::Type::User2
     include Constants		# Now the constants can be used unqualified

     puts Constant2
   end
end



Gary Wright