Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Config::Generic::Parser
Configuration File Parser

Config::Generic::Parser - Configuration File Parser


NAME

Config::Generic::Parser - Configuration File Parser


SYNOPSIS


 use Config::Generic::Parser;

 my $parser = new Config::Generic::Parser();

 my $parsetree = $parser->startrule($text);

 

=head1 DESCRIPTION

This module parses configuration files. If you are an ``end-user'', you are probably looking for the Config::Generic manpage and not for this module.

This module is autogenerated from Parser.y using the Parse::RecDescent manpage.


METHODS

startrule($text)
Starts parsing $text. Returns an Config::Generic::UnnamedSection object containing the parsed configuration elements.


NOTES

The description of Config::Generic::{Element, *Section, Directive} assumes that the parsetree was verified using Config::Generic-verify()>. If this is not the case, you may experience unexpected behaviour.

This is because the verify method does more than verifying. It also ``marks'' some elements in a special way. For example, if you have a specification


 MultiDirective alias /w+/

and a configuration


 alias foo

you might think that you can skip the verification because you know that the configuration conforms to the specification. But this is not the case. verify() will also mark the directive alias as multiple (because this cannot be concluded from the configuration) so the access methods change. If you have tied the configuration, you will get


 $config->{alias} = "foo"

before the verify call and


 $config->{alias} = [ "foo" ]

after the verify call. This is intended behaviour, because an element that might be specified multiple should always be accessed as if it is.

Note: ``foo'' is a placeholder for an Config::Generic::Directive object that evaluates to ``foo'' in a string context.


BUGS

None known yet. But they probably exist because the module is very new and untested. So please report anything suspecious you find.


TODO

Nothing :-)


SEE ALSO

the Config::Generic::Element manpage, the Config::Generic::Section manpage, the Config::Generic::Directive manpage, the Config::Generic::UnnamedSection manpage, the Config::Generic::NamedSection manpage, the Config::Generic::TieWrapper manpage, the Config::Generic::Parser manpage


AUTHOR

Nikolaus Rath, <Nikolaus@rath.org>


COPYRIGHT AND LICENSE

Copyright 2003 by Nikolaus Rath

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy