RogersMine

 view release on metacpan or  search on metacpan

local/lib/perl5/x86_64-linux-thread-multi/Glib/KeyFile.pod  view on Meta::CPAN

=head1 NAME

Glib::KeyFile -  Parser for .ini-like files

=cut

=for position SYNOPSIS

=head1 SYNOPSIS

  use Glib;

  $data .= $_ while (<DATA>);

  $f = Glib::KeyFile->new;
  $f->load_from_data($data);
  if ($f->has_group('Main') && $f->has_key('Main', 'someotherkey')) {
      $val = $f->get_integer('Main', 'someotherkey');
      print $val . "\n";
  }
  0;
  __DATA__
  # a comment
  [MainSection]
  somekey=somevalue
  someotherkey=42
  someboolkey=true
  listkey=1;1;2;3;5;8;13;21
  localekey=Good Morning
  localekey[it]=Buon giorno
  localekey[es]=Buenas dias
  localekey[fr]=Bonjour

=for position DESCRIPTION

=head1 DESCRIPTION

B<Glib::KeyFile> lets you parse, edit or create files containing groups of
key-value pairs, which we call key files for lack of a better name. Several
freedesktop.org specifications use key files now, e.g the Desktop Entry
Specification and the Icon Theme Specification.

The syntax of key files is described in detail in the Desktop Entry
Specification, here is a quick summary: Key files consists of groups of
key-value pairs, interspersed with comments.

=cut



=for object Glib::KeyFile Parser for .ini-like files
=cut




=head1 METHODS

=head2 keyfile = Glib::KeyFile-E<gt>B<new> 

=head2 boolean = $key_file->B<get_boolean> ($group_name, $key)

=over

=item * $group_name (string) 

=item * $key (string) 

=back

Retrieves a boolean value from $key inside $group_name.

May croak with a L<Glib::Error> in $@ on failure.

=head2 list = $key_file->B<get_boolean_list> ($group_name, $key)

=over

=item * $group_name (string) 

=item * $key (string) 

=back

Retrieves a list of booleans from $key inside $group_name.

May croak with a L<Glib::Error> in $@ on failure.

=head2 $key_file-E<gt>B<set_boolean_list> ($group_name, $key, ...)

=over

=item * $group_name (string) 

=item * $key (string) 

=item * ... (list) list of booleans

=back



( run in 1.178 second using v1.01-cache-2.11-cpan-39bf76dae61 )