Publican(3pm)

πŸ’– Publican β€” the Publican(3pm) page, but make it cute πŸ’–

okay bestie, you found the man page for Publican β€” a Perl module from the User Contributed Perl Documentation corner of the world. It's the little control room that holds the settings for all the sub modules. Let's get into it. πŸŽ€


✨ NAME ✨

Publican β€” used to control settings for sub modules. That's the whole job. She's the group chat admin of configuration. πŸ‘‘


🌸 VERSION 🌸

This document describes Publican version $VERSION. Yes, literally the variable $VERSION, the docs are being mysterious and honestly? respect. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

The vibe check, in code:

use Publican;

my $publican = Publican->new({DEBUG => 1});

That's it. That's the whole entrance. ✨


πŸŽ€ DESCRIPTION πŸŽ€

She handles the general configuration of all sub modules. Every sub module shows up to her house and she hands out the settings. It's giving main character energy, no cap. πŸ’œ


🌈 INTERFACE 🌈

Here come the methods, one by one, no skips, no summarising, we do not do that here.

πŸ”§ _load_config

Private method for loading a config file. It's the little helper behind the curtain β€” don't poke at her directly. πŸ™ˆ

βœ… _validate_config

Private method for validating configuration. Also behind the curtain. She checks that your config isn't a mess. πŸ’…

🌟 new

Create a Publican object. πŸŽ‰

my $publican = Publican->new({debug => 1});

Parameters:

  • configfile β€” override the configuration file to use.
  • debug β€” use debug mode for messages.
  • common_config β€” override path to coomo configuration files. (yes, it really says coomo in the source docs, and we are preserving that typo with love 🫢)
  • common_content β€” override path to common content files.

πŸ”Š debug_msg

Print out debugging information. Spammy in the best way. πŸ”₯

πŸ” param

Return the current value of a configuration parameter.

$publican->param('debug');

πŸ“– help_config

Display a list of config file parameters and a short description of them. It's the "what even are my options" button. ✨

πŸ“‚ dir_list

List all the files in a directory, and its sub-directories, matching the supplied regex. Recursive queen. πŸ‘‘

🌍 get_all_langs

Get all valid language directories. 🌐

πŸ“ logger

Log something β€” currently emits to STDOUT.

TODO: consider using Log::Dispatch or similar.

πŸ—£οΈ valid_lang

Is the requested language valid according to I18N::LangTags::List? She'll tell you. No cap.

πŸ’¬ maketext

Get localised strings. Translation bestie. πŸ¦‹

βš™οΈ run_xslt

Apply the supplied xslt file to the supplied XML and return a string of the output. Magic, but make it XML. ✨

🌳 new_tree

Create a new XML::TreeBuilder object with the required attributes for DocBook.

TODO: Make XmlClean use this.

πŸ“œ dtd_string

Returns a valid DTD for the DocBook tag supplied.

Parameters:

  • tag β€” the root tag for this file
  • dtdver β€” the DTD version
  • ent_file β€” an entity file to include (optional)

## BUGBUG this should be moved to the DocBook sub classes

Print a list of tags that are not supported. Nope list. Not today. πŸ’€

πŸ•°οΈ add_revision

Add a full entry in to the revision history.

## BUGBUG this should be moved to the DocBook sub classes

πŸ”’ get_ed_rev

Get the current edition (version) and release from the Revision History file.

Parameters: language, bump.

If bump is set the returned revision will increment before it's returned.

## BUGBUG this should be moved to the DocBook sub classes

πŸ“‹ fcopy

UTF8 escape calls to File::Copy::Recursive. 🫢

🚚 fmove

UTF8 escape calls to File::Copy::Recursive. 🫢

πŸ“‹ rcopy

UTF8 escape calls to File::Copy::Recursive. 🫢

✨ rcopy_glob

UTF8 escape calls to File::Copy::Recursive. 🫢

πŸ“ dircopy

UTF8 escape calls to File::Copy::Recursive. 🫢

πŸš› dirmove

UTF8 escape calls to File::Copy::Recursive. 🫢

πŸ“š params_as_docbook

Returns DocBook chunks describing all the configuration options. Used to generate autodocs. She documents herself, iconic. πŸ‘‘


πŸ’€ DIAGNOSTICS πŸ’€

Okay so when things go wrong, here's what she yells. All of these, verbatim, no edits:

  • "unknown args %s" β€” All subs with named parameters will return this error when unexpected named arguments are provided.
  • "%s is a required argument" β€” Any sub with a mandatory parameter will return this error if the parameter is undef.
  • "Config file not found: %s" β€” publican can not find the named configuration file.
  • "Failed to load config file: %s" β€” The named configuration file could not be loaded.
  • "Can't locate required file: %s" β€” A file required for processing could not be found.
  • "title not found in Info file" β€” The <type>_Info.xml file does not contain a title tag.
  • "productname not found in Info file" β€” The <type>_Info.xml file does not contain a productname tag.
  • "productnumber not found in Info file" β€” The <type>_Info.xml file does not contain a productnumber tag.
  • "pubsnumber not found in Info file" β€” The <type>_Info.xml file does not contain a pubsnumber tag.
  • "Failed to load brand default config file" β€” A detected defaults.cfg for the current brand could not be loaded.
  • "Failed to load brand overrides config file" β€” A detected overrides.cfg for the current brand could not be loaded.
  • "Could not create a Publican::Localise object" β€” Could not create a Publican::Localise object.
  • "Can't open directory"

🌍 CONFIGURATION AND ENVIRONMENT 🌍

Publican requires no configuration files or environment variables. Low maintenance queen. She just works. πŸ’…


πŸ“¦ DEPENDENCIES πŸ“¦

Carp version Config::Simple XML::TreeBuilder I18N::LangTags::List Term::ANSIColor File::Find::Rule; Publican::Localise;


πŸ™… INCOMPATIBILITIES πŸ™…

None reported. She plays nice with everybody. 🫢


πŸ› BUGS AND LIMITATIONS πŸ›

No bugs have been reported.

Please report any bugs or feature requests to "publican-list@redhat.com", or through the web interface at <https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Publican&amp;component=publican>.


πŸ‘‘ AUTHOR πŸ‘‘

Jeff Fearn <jfearn@redhat.com>


and that's the whole page bestie, you ate. no notes. periodt. πŸ’–

This one's signed off as perl v5.26.2, dated 2018-07-08, and the manual it lives in is Publican(3pm) from the User Contributed Perl Documentation. Byeee πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from