Config...tector(3pm)

πŸ’– Config::Model::Itself::BackendDetector πŸ’–

okay bestie, so this is Config::Model::Itself::BackendDetector β€” a 3pm manual page from the User Contributed Perl Documentation collection. she's a lil helper class whose entire job is detecting the read/write backends that config models can actually use. iconic behavior honestly. πŸŽ€


✨ NAME ✨

Config::Model::Itself::BackendDetector β€” detects the available read/write backends that config models can use. that's it, that's the whole vibe check. πŸ¦‹


🌸 VERSION 🌸

version 2.027 β€” yes she's got a number and she's proud of it. πŸ’…


⭐ SYNOPSIS ⭐

okay so first thing's first, bestie: this class is not something you just casually make yourself. you reference it in a configuration model, and Config::Model::Node is the one who creates it. periodt.

# this class should be referenced in a configuration model and
# created only by Config::Model::Node

my $model = Config::Model->new() ;

$model ->create_config_class
 (
  name => "Test",
  'element'
  => [
      'backend' => { type => 'leaf',
                     class => 'Config::Model::Itself::BackendDetector' ,
                     value_type => 'enum',
                     # specify backends built in Config::Model
                     choice => [qw/cds_file perl_file ini_file custom/],

                     help => {
                              cds_file => "file ...",
                              ini_file => "Ini file ...",
                              perl_file => "file  perl",
                              custom => "Custom format",
                             }
                   }
     ],
 );

 my $root = $model->instance(root_class_name => 'Test') -> config_root ;

 my $backend = $root->fetch_element('backend') ;

 my @choices = $backend->get_choice ;

see how it all flows? model β†’ config class β†’ instance β†’ root β†’ fetch the backend element β†’ grab the choices. the whole glow-up pipeline. 🌈


πŸ’œ DESCRIPTION πŸ’œ

so here's the tea, bestie. πŸ“

this class is derived from Config::Model::Value. she's built to be used inside an enum value, where the choices β€” like, the available backends β€” are made up of:

  • the backends built in Config::Model, plus
  • all the plugin backends β€” and by "all the plugin backends" we mean every single Config::Model::Backend::* class out there. all of them. the whole squad. πŸ’€

and like, this module doesn't just sit there being cute (tho she does that too). she will:

  1. detect the available plugin backends, and
  2. query their pod documentation so she can serve up a lil contextual help for the config-model graphical editor. 🧚

helpful queen energy fr fr. πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

  • Config::Model
  • Config::Model::Node
  • Config::Model::Value

go read them, they're the supporting cast and they ate. πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Dominique Dumont β€” the mastermind. respect. 🫢


This software is Copyright (c) 2007-2026 by Dominique Dumont.

This is free software, licensed under:

The GNU Lesser General Public License, Version 2.1, February 1999
lgpl 2.1, february 1999, no cap. read the license bestie, it's literally right there. πŸ“œ

and that's the whole page! this one was perl v5.40.1, dated 2026-03-10, from the User Contributed Perl Documentation set. mwah, go forth and detect some backends. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from