GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CONFIG::SETTING::CHUNK (3)

.ds Aq ’

NAME

Config::Setting::Chunk - Representation of a configuration file

CONTENTS

SYNOPSIS



  use Config::Setting::Chunk;

  my $chunk = Config::Setting::Chunk->new;
  $chunk->add_section( "login" );
  $chunk->set_item( "login", "username", "fred" );

  my @sections = $chunk->sections;
  my $username = $chunk->get_item( "login", "username" );



DESCRIPTION

This class is a representation of a configuration file. A chunk consists of zero or more sections, each of which consists of zero or more items.

METHODS

new ( ) Class Method. Constructor.
add_section ( SECTION ) Create a new section named SECTION. Has no effect if SECTION is already present in this chunk.
sections ( ) Return a list of all sections in this chunk, in the order in which they were added.
has_section ( SECTION ) Returns true or false if SECTION is present or not in this chunk.
section_keys ( SECTION ) Returns a list of all keys present in SECTION.
set_item ( SECTION, KEY, VALUE ) Set the item KEY to have VALUE in SECTION. if SECTION does not exist, it will be created.
get_item ( SECTION, KEY ) Return the value of KEY in SECTION. Returns undef if KEY or SECTION does not exist.
get ( KEY ) Return the value of KEY in the first section which contains it, or undef if no section contains it.
to_string ( ) Returns the chunk in windows .INI style format. This may be useful for debugging.

AUTHOR

Dominic Mitchell, <cpan (at) happygiraffe.net>

SEE ALSO

Config::Setting.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CONFIG::SETTING::CHUNK (3) 2016-03-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.