OpenGu...Config(3pm)

πŸ“¦
version 0.84 Β· 3 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– OpenGuides::Config πŸ’–

okay bestie, gather round, because we're diving into OpenGuides::Config β€” that's the 3pm manual, aka the User Contributed Perl Documentation section, aka the place where Perl modules spill their whole life story. This one handles the OpenGuides config variables, and yes it is exactly as chaotic-iconic as that sounds. πŸŽ€


✨ NAME ✨

OpenGuides::Config β€” bestie, it literally handles OpenGuides configuration variables. That's the whole job. That's the vibe. πŸ’…


🌸 DESCRIPTION 🌸

It does config stuff for OpenGuides. Periodt. πŸ’œ

It's distributed and installed as part of the OpenGuides project, and it is not intended for independent installation β€” so don't try to adopt it and raise it on your own, it already has a family. 🫢

Real talk: this documentation is probably only useful to OpenGuides developers. If that's not you, you can still read it for fun, no gatekeeping here. ✨

πŸ¦‹ METHODS πŸ¦‹

🌟 new

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

It initialises itself from the config file you specified, plus environment variables of the form OPENGUIDES_CONFIG_READ_ONLY. πŸŽ€

Any variable that isn't set in that file but does have a sensible default gets initialised the way we describe down in ACCESSORS. Everything else? Gets a value of undef. Yeah. Not set. Blank. The void. 😭

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

Same deal as above, except it pulls the variables from a hashref you supply instead of from a file. Iconic, honestly. ✨


πŸ‘‘ ACCESSORS πŸ‘‘

Every single accessor below is read-write. And on top of that, each one also has a read-write accessor named like dbname__qu β€” that one holds an English-language question suitable for asking for a value for that variable. πŸ’…

You shouldn't write to those __qu ones, but like... nothing stops you. It's not enforced. Do with that information what you will. πŸ™ˆ

The defaults mentioned below are the ones applied when ->new is called, and only to variables that weren't supplied in the config file.

  • dbname β€” no default listed, it just vibes.
  • dbuser β€” also just vibing.
  • dbpass β€” your lil secret. πŸ”’
  • dbhost β€” where the database lives.
  • dbport β€” the door number.
  • dbencoding β€” encoding, bestie.
  • script_name β€” default: "wiki.cgi"
  • install_directory β€” default: "/usr/lib/cgi-bin/openguides/"
  • script_url β€” and here's the tea: this one is constrained to always end in / ✨
  • custom_lib_path β€” custom lib path, as advertised.
  • use_plucene β€” default: true
  • use_lucy β€” default: false
  • search_content_munger_module β€” the munger. 🧚
  • indexing_directory β€” default: "/usr/lib/cgi-bin/openguides/indexes"
  • enable_page_deletion β€” default: false
  • admin_pass β€” default: "Change This!" (bestie. change it. no cap. 😭)
  • stylesheet_url β€” the drip. πŸ’…
  • 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 β€” charset time.
  • contact_email β€” how the people reach you. πŸ“§
  • formatting_rules_node β€” default: "Text Formatting Examples"
  • formatting_rules_link β€” default: "http://openguides.org/text_formatting"
  • backlinks_in_title β€” default: false
  • geo_handler β€” default: 1
  • ellipsoid β€” default: "WGS-84"
  • use_leaflet β€” leaflet or not, your call.
  • gmaps_api_key β€” the key. πŸ”‘
  • centre_long β€” centre longitude, lowkey.
  • centre_lat β€” centre latitude, highkey.
  • default_gmaps_zoom β€” zoom level default.
  • default_gmaps_search_zoom β€” search zoom level default.
  • show_gmap_in_node_display β€” show it or don't.
  • force_wgs84 β€” force it. πŸ’ͺ
  • google_analytics_key β€” analytics key.
  • licence_name β€” the licence name. (British spelling, we don't make the rules. πŸ‡¬πŸ‡§)
  • licence_url β€” the licence URL.
  • licence_info_url β€” the licence info URL.
  • spam_detector_module β€” begone, spam. 🚫
  • host_checker_module β€” checks hosts, apparently.
  • custom_macro_module β€” macros but make them yours.
  • static_path β€” static path.
  • static_url β€” and same energy as script_url: this one is constrained to always end in / ✨
  • send_moderation_notifications β€” send them or nah.
  • moderate_whitelist β€” the whitelist, obviously.
  • website_link_max_chars β€” default: 25
  • read_only β€” read only mode, go off.
  • responsive β€” responsive design, slay. πŸ“±

🌈 AUTHOR 🌈

The OpenGuides Project (openguides-dev@lists.openguides.org) β€” say hi, they're lovely. 🫢


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. πŸŽ€


⭐ SEE ALSO ⭐

  • OpenGuides β€” go read that one next, bestie, it's the main character. πŸ‘‘

and that's the whole page, no crumbs left. πŸ’… this was documented as perl v5.32.0, dated 2021-01-30, and yeah the footer says OpenGu...Config(3pm) because apparently even the footer got shy. stay configured, bestie πŸ¦‹βœ¨

πŸ“¦ where this page comes from