source: devel/pb-doc/AppConfig::File.patch

Last change on this file was 39, checked in by bruno, 10 years ago

Add a patch to AppConfig::File to solve the issue around automatically create '1' key entry in all hashes

File size: 681 bytes
  • /usr/lib/perl5/vendor_perl/5.8.8/AppConfig/File.pm

    old new  
    2020
    2121require 5.005;
    2222
    23 use AppConfig;
     23use AppConfig qw(:argcount);
    2424use AppConfig::State;
    2525use File::HomeDir;
    2626
     
    227227
    228228        my $nargs = $state->_argcount($variable);
    229229
     230        # Fix a bug if the variable is a hash - 1 has been created as a key
     231        if ($nargs eq AppConfig::ARGCOUNT_HASH) {
     232            delete $state->{ VARIABLE }->{ $variable }{1};
     233        }
     234
    230235        # variables prefixed '-' are reset to their default values
    231236        if ($flag eq '-') {
    232237            $state->_default($variable);
Note: See TracBrowser for help on using the repository browser.