Mattia Barbon > Devel-ebug-Wx > Devel::ebug::Wx::Service::Configuration

Download:
Devel-ebug-Wx-0.09.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Devel::ebug::Wx::Service::Configuration - manage ebugger configuration

SYNOPSIS ^

  my $cm = ...->get_service( 'configuration' );
  my $cfg = $cm->get_config( 'service_name' );

  my $value_or_default = $cfg->get_value( 'value_name', $value_default );
  $cfg->set_value( 'value_name', $value );
  $cfg->delete_value( 'value_name' );

DESCRIPTION ^

The configuration service manages the global configuration for all services.

METHODS ^

get_config

  my $cfg = $cm->get_config( 'service_name' );
  my $cfg2 = $cm->get_config( 'service_name', 'myfile.ini' );

  my $value_or_default = $cfg->get_value( 'value_name', $value_default );
  $cfg->set_value( 'value_name', $value );
  $cfg->delete_value( 'value_name' );
  $cfg->get_serialized_value( 'value_name', $default );
  $cfg->set_serialized_value( 'value_name', $value );

  # force file rewrite
  $cm->flush( 'myfile.ini' );

Returns an object that can be used to read/change/delete the value of the configuration keys for a given service.

syntax highlighting: