Poet::...iguring(3pm)

πŸ“¦
version 0.16 Β· 2 versions
  • 0.16 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.16 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Poet::Manual::Configuring β€” it's the built-in Poet configuration options, bestie πŸ’… and yes she's a 3pm Perl manual page, we love that for her


πŸŽ€ DESCRIPTION πŸŽ€

Okay so listen. This is literally the list of configuration keys that Poet itself uses. You can drop these into any Poet conf file, like local.cfg or conf/global/*.cfg. Any of them. She's flexible like that πŸ’–

Entries like foo.bar can be written either in dot notation:

foo.bar: 5

or as part of a hash:

foo:
   bar: 5

See Dot notation for details. (iykyk πŸ¦‹)


🌸 The Keys, The Icons, The Moment 🌸

  • cache β€” the entire hash under this entry gets passed straight to Poet::Cache->config(). See Poet::Cache for examples, because bestie there are so many examples. e.g.
cache:
   defaults:
      expires_variance: 0.2
   storage:
      file:
         driver: File
         root_dir: ${root}/data/cache
      memcached:
         driver: Memcached
         servers: ["10.0.0.15:11211", "10.0.0.15:11212"]
         compress_threshold: 4096
   namespace:
      /some/component:       { storage: file, expires_in: 5min }
      /some/other/component: { storage: memcached, expires_in: 1h }
      Some::Library:         { storage: memcached, expires_in: 10min }
  • env.bin_dir, env.comps_dir, etc. β€” these entries change what comes back from $poet->bin_dir, $poet->bin_path, $poet->comps_dir, etc., which lowkey means they control where all your various Poet resources live. See Poet::Environment. For example, if you wanna move data and logs into external directories outside the environment:
env:
  data_dir: /some/external/data/dir
  logs_dir: /some/external/logs/dir
  • log.defaults, log.category β€” these set the log level, the output location, and the layout string for logging β€” in the default case and for particular categories respectively. See Poet::Log for examples. e.g.
log:
  defaults:
    level: info
    output: poet.log
    layout: "%d{dd/MMM/yyyy:HH:mm:ss.SS} [%p] %c - %m - %F:%L - %P%n"
  class:
    CHI:
      level: debug
      output: chi.log
      layout: "%d{dd/MMM/yyyy:HH:mm:ss.SS} %m - %P%n"
    MyApp::Foo:
      output: stdout
  • log.log4perl_conf β€” this one lets you bypass Poet's simplified logging configuration entirely and point at a log4perl conf file directly. e.g.
log:
  log4perl_conf: /path/to/log4perl.conf
  • mason β€” the hash under this entry gets treated as options passed to Mason->new for the main Mason instance, overriding any default options. See Poet::Mason. e.g.
mason:
  static_source: 1
  static_source_touch_file: ${root}/data/purge.dat
  • server.default_content_type β€” the content type for requests that don't explicitly set one. Defaults to text/html. Simple, iconic, does her job πŸ‘‘
  • server.host β€” the IP address to listen on.
  • server.load_modules β€” a list of modules to load on server startup, e.g.
server.load_modules:
   - DBI
   - List::Util
   - MyApp::Foo
   - MyApp::Bar
  • server.port β€” the port to listen on. That's it, that's the whole vibe ✨

πŸ¦‹ SEE ALSO πŸ¦‹

  • Poet β€” go read her, she's the moment πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

Jonathan Swartz <swartz@pobox.com> β€” king behavior, fr fr 🫢


This software is copyright (c) 2012 by Jonathan Swartz.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Slay, legally speaking 🌈


and that's the whole page bestie, no cap πŸ’… this was perl v5.34.0 energy, dated 2022-06-18, and yeah the man page title is literally Poet::...iguring(3pm) because apparently nobody had the range to spell it out. iconic. mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from