Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Handel::ConfigReader 1.00005

    Download button

    No screenshots available
    Downloads: 369  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Christopher H. Laco | More programs
    Perl Artistic License / FREE
    September 13th, 2007, 18:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Handel::ConfigReader description

    Handel::ConfigReader can read in Handel configuration settings from ENV/ModPerl.

    Handel::ConfigReader can read in Handel configuration settings from ENV/ModPerl.

    SYNOPSIS

    use Handel::ConfigReader;

    my $cfg = Handel::ConfigReader->instance();
    my $setting = $cfg->get('HandelMaxQuantity');
    my $other = $cfg->{'OtherSetting'};

    Handel::ConfigReader is a generic wrapper to get various configuration values. As some point this will probably get worked into XS/custom httpd.conf directives.

    Each configuration object is also a tied hash. The two usages are the same:

    my $cfg = Handel::ConfigReader->instance();

    my $setting = $cfg->get('Setting');
    my $setting = $cfg->{'Setting'};

    The latter is the preferred usage in anticipation of also integrating Apache::ModuleConfig and custom directives which use the same hash syntax.

    CONSTRUCTOR

    new

    Returns a new Handel::ConfigReader instance.

    my $cfg = Handel::ConfigReader->new();

    instance

    Returns the same Handel::ConfigReader instance for each call.

    my $cfg = Handel::ConfigReader->instance();

    METHODS

    get

    Arguments: $key [, $default]

    Returns the configured value for the key specified. You can use this as an instance method or as a simpleton:

    my $cfg = Handel::ConfigReader->instance();
    my $setting = $cfg->get('HandelMaxQuantity');

    my $cfg = Handel::ConfigReader->instance();
    my $setting = $cfg->get('HandelMaxQuantity');

    You can also pass a default value as the second parameter. If no value is loaded for the key specified, the default value will be returned instead.

    my $cfg = Handel::ConfigReader->instance();
    my $setting = $cfg->get('DoesNotExist', 'foo');
    print $setting; # foo

    FETCH

    Arguments: $key

    Returns an item form the configuration via tied hash.

    my $cfg = Handel::ConfigReader->new;
    my $setting = $cfg->{'MySetting'};

    EXISTS

    Arguments: $key

    Returns true if the specified setting returns a defined value.

    my $cfg = Handel::ConfigReader->new;
    if (exists $cfg->{'MySetting'}) {
    ...
    };

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Handel configuration | configuration reader | Perl module | Handel | configuration | settings

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM