Rechercher une page de manuel
Glib::OptionContext.3pm
Langue: en
Version: 2010-08-25 (MeeGo - 06/11/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
- NAME
- SYNOPSIS
- HIERARCHY
- METHODS
- optioncontext = Glib::OptionContext->new ($parameter_string)
- $context->add_group ($group)
- $context->add_main_entries ($entries, $translation_domain)
- boolean = $context->get_help_enabled
- $context->set_help_enabled ($help_enabled)
- boolean = $context->get_ignore_unknown_options
- $context->set_ignore_unknown_options ($ignore_unknown)
- optiongroup = $context->get_main_group
- $context->set_main_group ($group)
- boolean = $context->parse
- SEE ALSO
- COPYRIGHT
NAME
Glib::OptionContextSYNOPSIS
my ($verbose, $source, $filenames) = ('', undef, []); my $entries = [ { long_name => 'verbose', short_name => 'v', arg_type => 'none', arg_value => \$verbose, description => 'be verbose' }, { long_name => 'source', short_name => 's', arg_type => 'string', arg_value => \$source, description => 'set the source', arg_description => 'source' }, [ 'filenames', 'f', 'filename-array', \$filenames ], ]; my $context = Glib::OptionContext->new ('- urgsify your life'); $context->add_main_entries ($entries, 'C'); $context->parse (); # $verbose, $source, and $filenames are now updated according to the # command line options given
HIERARCHY
Glib::Boxed +----Glib::OptionContext
METHODS
optioncontext = Glib::OptionContext->new ($parameter_string)
- •
- $parameter_string (string)
$context->add_group ($group)
- •
- $group (Glib::OptionGroup)
$context->add_main_entries ($entries, $translation_domain)
- •
- $entries (scalar) reference to an array of option entries
- •
- $translation_domain (string)
boolean = $context->get_help_enabled
$context->set_help_enabled ($help_enabled)
- •
- $help_enabled (boolean)
boolean = $context->get_ignore_unknown_options
$context->set_ignore_unknown_options ($ignore_unknown)
- •
- $ignore_unknown (boolean)
optiongroup = $context->get_main_group
$context->set_main_group ($group)
- •
- $group (Glib::OptionGroup)
boolean = $context->parse
This method works directly on @ARGV.May croak with a Glib::Error in $@ on failure.
SEE ALSO
Glib, Glib::BoxedCOPYRIGHT
Copyright (C) 2003-2009 by the gtk2-perl team.This software is licensed under the LGPL. See Glib for a full notice.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre