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
Config::Setting::Chunk(3) User Contributed Perl Documentation Config::Setting::Chunk(3)

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

  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" );

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.

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.

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

Config::Setting.
2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

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