NAME
ALPM::LoadConfig - pacman.conf config file parsing class.
SYNOPSIS
# At startup:
use ALPM qw( /etc/pacman.conf );
# At runtime:
ALPM->load_config('/etc/pacman.conf');
# Load custom fields as well:
my $value;
my %fields = ( 'CustomField' => sub { $value = shift } );
my $loader = ALPM::LoadConfig->new( custom_fields => \%fields );
$loader->load_file( '/etc/pacman.conf' );
DESCRIPTION
This class is used internally by ALPM to parse pacman.conf config files. The settings are used to set ALPM options. You probably don't need to use this module directly.
CONSTRUCTOR
new
$OBJ = ALPM::LoadConfig->new( custom_fields => \%FIELDS_REF? );
- Parameters
-
\%FIELDS_REF
(Hash Reference) (Optional)-
Keys are field names from the
/etc/pacman.conf
configuration file. Values are code references. When a field is found inside the configuration file with the exact same name, then the code reference is called, passed the value of the entry as the only argument.
METHODS
load_config
undef = $OBJ->load_config( $CFG_FILE_PATH )
This method will read a configuration file, setting ALPM options as it goes.
SEE ALSO
AUTHOR
Justin Davis, <juster at cpan dot org>
COPYRIGHT AND LICENSE
Copyright (C) 2011 by Justin Davis
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 269:
You forgot a '=back' before '=head1'