{
    "mode": "perldoc",
    "parameter": "Log::Log4perl::Config::BaseConfigurator",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Log%3A%3ALog4perl%3A%3AConfig%3A%3ABaseConfigurator/json",
    "generated": "2026-06-11T06:17:22Z",
    "synopsis": "This is a virtual base class, all configurators should be derived from it.",
    "sections": {
        "NAME": {
            "content": "Log::Log4perl::Config::BaseConfigurator - Configurator Base Class\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "This is a virtual base class, all configurators should be derived from it.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "METHODS\n\"new\"\nConstructor, typically called like\n\nmy $configparser = SomeConfigParser->new(\nfile => $file,\n);\n\nmy $data = $configparser->parse();\n\nInstead of \"file\", the derived class \"SomeConfigParser\" may define any type of configuration\ninput medium (e.g. \"url => 'http://foobar'\"). It just has to make sure its \"parse()\" method\nwill later pull the input data from the medium specified.\n\nThe base class accepts a filename or a reference to an array of text lines:\n\n\"file\"\nSpecifies a file which the \"parse()\" method later parses.\n\n\"text\"\nSpecifies a reference to an array of scalars, representing configuration records\n(typically lines of a file). Also accepts a simple scalar, which it splits at its\nnewlines and transforms it into an array:\n\nmy $configparser = MyYAMLParser->new(\ntext => ['foo: bar',\n'baz: bam',\n],\n);\n\nmy $data = $configparser->parse();\n\nIf either \"file\" or \"text\" parameters have been specified in the constructor call, a later\ncall to the configurator's \"text()\" method will return a reference to an array of\nconfiguration text lines. This will typically be used by the \"parse()\" method to process the\ninput.\n\n\"parse\"\nVirtual method, needs to be defined by the derived class.\n",
            "subsections": [
                {
                    "name": "Parser requirements",
                    "content": "*   If the parser provides variable substitution functionality, it has to implement it.\n\n*   The parser's \"parse()\" method returns a reference to a hash of hashes (HoH). The top-most\nhash contains the top-level keywords (\"category\", \"appender\") as keys, associated with\nvalues which are references to more deeply nested hashes.\n\n*   The \"log4perl.\" prefix (e.g. as used in the PropertyConfigurator class) is stripped, it's\nnot part in the HoH structure.\n\n*   Each Log4perl config value is indicated by the \"value\" key, as in\n\n$data->{category}->{Bar}->{Twix}->{value} = \"WARN, Logfile\"\n\nEXAMPLES\nThe following Log::Log4perl configuration:\n\nlog4perl.category.Bar.Twix        = WARN, Screen\nlog4perl.appender.Screen          = Log::Log4perl::Appender::File\nlog4perl.appender.Screen.filename = test.log\nlog4perl.appender.Screen.layout   = Log::Log4perl::Layout::SimpleLayout\n\nneeds to be transformed by the parser's \"parse()\" method into this data structure:\n\n{ appender => {\nScreen  => {\nlayout => {\nvalue  => \"Log::Log4perl::Layout::SimpleLayout\" },\nvalue  => \"Log::Log4perl::Appender::Screen\",\n},\n},\ncategory => {\nBar => {\nTwix => {\nvalue => \"WARN, Screen\" }\n} }\n}\n\nFor a full-fledged example, check out the sample YAML parser implementation in \"eg/yamlparser\".\nIt uses a simple YAML syntax to specify the Log4perl configuration to illustrate the concept.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "Log::Log4perl::Config::PropertyConfigurator\n\nLog::Log4perl::Config::DOMConfigurator\n\nLog::Log4perl::Config::LDAPConfigurator (tbd!)\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "Copyright 2002-2013 by Mike Schilli <m@perlmeister.com> and Kevin Goess <cpan@goess.org>.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Please contribute patches to the project on Github:\n\nhttp://github.com/mschilli/log4perl\n\nSend bug reports or requests for enhancements to the authors via our\n\nMAILING LIST (questions, bug reports, suggestions/patches): log4perl-devel@lists.sourceforge.net\n\nAuthors (please contact them via the list above, not directly): Mike Schilli\n<m@perlmeister.com>, Kevin Goess <cpan@goess.org>\n\nContributors (in alphabetical order): Ateeq Altaf, Cory Bennett, Jens Berthold, Jeremy Bopp,\nHutton Davidson, Chris R. Donnelly, Matisse Enzer, Hugh Esco, Anthony Foiani, James FitzGibbon,\nCarl Franks, Dennis Gregorovic, Andy Grundman, Paul Harrington, Alexander Hartmaier David Hull,\nRobert Jacobson, Jason Kohles, Jeff Macdonald, Markus Peter, Brett Rann, Peter Rabbitson, Erik\nSelberg, Aaron Straup Cope, Lars Thegler, David Viner, Mac Yang.\n",
            "subsections": []
        }
    },
    "summary": "Log::Log4perl::Config::BaseConfigurator - Configurator Base Class",
    "flags": [],
    "examples": [],
    "see_also": []
}