Scroll to navigation

OpenGuides::Config(3pm) User Contributed Perl Documentation OpenGuides::Config(3pm)


OpenGuides::Config - Handle OpenGuides configuration variables.


Does config stuff for OpenGuides. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers.


  my $config = OpenGuides::Config->new( file => "wiki.conf" );

Initialises itself from the config file specified and environment variables of the form OPENGUIDES_CONFIG_READ_ONLY. Variables which are not set in that file, and which have sensible defaults, will be initialised as described below in ACCESSORS; others will be given a value of "undef".

  my $config = OpenGuides::Config->new( vars => { dbname => "foo" } );

As above but gets variables from a supplied hashref instead.


Each of the accessors described below is read-write. Additionally, for each of them, there is also a read-write accessor called, for example, "dbname__qu". This will contain an English-language question suitable for asking for a value for that variable. You shouldn't write to them, but this is not enforced.

The defaults mentioned below are those which are applied when "->new" is called, to variables which are not supplied in the config file.

  • dbname
  • dbuser
  • dbpass
  • dbhost
  • dbport
  • dbencoding
  • script_name (default: "wiki.cgi")
  • install_directory (default: "/usr/lib/cgi-bin/openguides/")
  • script_url (this is constrained to always end in "/")
  • custom_lib_path
  • use_plucene (default: true)
  • use_lucy (default: false)
  • search_content_munger_module
  • indexing_directory (default: "/usr/lib/cgi-bin/openguides/indexes")
  • enable_page_deletion (default: false)
  • admin_pass (default: "Change This!")
  • stylesheet_url
  • site_name (default: "Unconfigured OpenGuides site")
  • navbar_on_home_page (default: true)
  • recent_changes_on_home_page (default: true)
  • random_page_omits_locales (default: false)
  • random_page_omits_categories (default: false)
  • content_above_navbar_in_html (default: false)
  • home_name (default: "Home")
  • site_desc (default: "A default configuration of OpenGuides")
  • default_city (default: "London")
  • default_country (default: "United Kingdom")
  • default_language (default: "en")
  • http_charset
  • contact_email
  • formatting_rules_node (default: "Text Formatting Examples")
  • formatting_rules_link (default: ""
  • backlinks_in_title (default: false)
  • geo_handler (default: 1)
  • ellipsoid (default: "WGS-84")
  • use_leaflet
  • gmaps_api_key
  • centre_long
  • centre_lat
  • default_gmaps_zoom
  • default_gmaps_search_zoom
  • show_gmap_in_node_display
  • force_wgs84
  • google_analytics_key
  • licence_name
  • licence_url
  • licence_info_url
  • spam_detector_module
  • host_checker_module
  • custom_macro_module
  • static_path
  • static_url (this is constrained to always end in "/")
  • send_moderation_notifications
  • moderate_whitelist
  • website_link_max_chars (default: 25)
  • read_only
  • responsive


The OpenGuides Project (


     Copyright (C) 2004-2020 The OpenGuides Project.  All Rights Reserved.

The OpenGuides distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself.



2021-01-30 perl v5.32.0