1object template pantest; 2 3# Very simple pan test file 4"/long/decimal" = 123; 5"/long/octal" = 0755; 6"/long/hexadecimal" = 0xFF; 7 8"/double/simple" = 0.01; 9"/double/pi" = 3.14159; 10"/double/exponent" = 1e-8; 11"/double/scientific" = 1.3E10; 12 13"/string/single" = 'Faster, but escapes like \t, \n and \x3d don''t work, but '' should work.'; 14"/string/double" = "Slower, but escapes like \t, \n and \x3d do work"; 15 16variable TEST = 2; 17 18"/x2" = to_string(TEST); 19"/x2" ?= 'Default value'; 20 21"/x3" = 1 + 2 + value("/long/decimal"); 22 23"/x4" = undef; 24 25"/x5" = null; 26 27variable e ?= error("Test error message"); 28 29# include gmond config for services-monitoring 30include { 'site/ganglia/gmond/services-monitoring' }; 31 32"/software/packages"=pkg_repl("httpd","2.2.3-43.sl5.3",PKG_ARCH_DEFAULT); 33"/software/packages"=pkg_repl("php"); 34 35# Example function 36function show_things_view_for_stuff = { 37 thing = ARGV[0]; 38 foreach( i; mything; STUFF ) { 39 if ( thing == mything ) { 40 return( true ); 41 } else { 42 return SELF; 43 }; 44 }; 45 false; 46}; 47 48variable HERE = <<EOF; 49; This example demonstrates an in-line heredoc style config file 50[main] 51awesome = true 52EOF 53 54variable small = false;#This should be highlighted normally again. 55