Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 4: Line 4:     
There are several ways to do this, both locally and remotely.
 
There are several ways to do this, both locally and remotely.
 +
 +
===Enable template debugging===
 +
 +
I happened to stumble over this in the templates.pm file
 +
 +
config set processtemplate Debug yes
 +
 +
This will add some debugging lines to /var/log/messages showing you the progress of the template expansion.
 +
 +
To disable either set the key to no or delete it.
 +
 +
===Builtin Db routines===
 +
 +
You can also use a couple of routines from db.pm
 +
 +
=item B<db_print>
 +
  db_print(\%config);
 +
  db_print(\%config, $key);
 +
Prints out keys and raw values in the %config database.  If $key is
 +
given it prints the $key and its raw value.  If no $key is given it
 +
prints out all the keys and their raw values.
 +
 +
=item B<db_show>
 +
  db_show(\%config);
 +
  db_show(\%config, $key);
 +
Prints out keys and their values in a human readable format.
 +
If $key is given it prints out the $key, type and properties of that
 +
$key.  Otherwise it prints out the key, type and properties for all
 +
keys.
 +
 +
=item B<db_print_type>
 +
  db_print_type(\%config);
 +
  db_print_type(\%config, $key);
 +
Prints out keys and their types in the %config database.
 +
If $key is given, it prints out just that $key and its type.
 +
Otherwise it prints out all the keys and their types.
 +
 +
=item B<db_print_prop>
 +
  db_print_prop(\%config, $key);
 +
  db_print_prop(\%config, $key, $property);
 +
Prints out the properties (or a single $property) of the given $key in
 +
the %config.
 +
    
===Locally using perl -d===
 
===Locally using perl -d===

Navigation menu