#11 Neat Parameter Spacing

None
closed
nobody
None
1
2014-01-07
2014-01-07
Anonymous
No

Option for 'neat parameter spacing', (lining up parameter values with monospaced fonts). Example:

[section]
param1 = value1
parameter2 = value2
p3 = value3

1 Attachments

Discussion


  • Anonymous
    2014-01-07

    Dear Anonymous,

    thanks for the patch. It seems useful for some people, but it has some issues:

    1. It isn't made against the CPAN distro’s main directory of the "config-inifiles" sub-directory of the Mercurial repository.

    2. The patch does not contain a regression test for the feature under t/.

    3. The patch has one line which introduces some trailing whitespace and as a result fails t/style-trailing-space.t (assuming Test::TrailingSpace is installed which should be.)

    4. «_longest_parameter» should be called «_longest_parameter_length» or «_longest_parameter_len» or even «_longest_param_len». Similarly, «$longest» should be «$longest_len» or just do. You should also do «$len = List::Util::max($len, length($parm));» to remove some duplicate code.

    5. You're missing some empty lines separating paragraphs (see http://perl-begin.org/tutorials/bad-elements/#paragraphs ) and spaces after the ",".

    6. '-neatparameterspacing' should be '-neat_paramater_spacing'.

    7. This new feature is completely un-documented. You should add documentation to the POD.


    Please consider writing a better patch or better yet - prepare a pull request for our BitBucket repository: https://bitbucket.org/shlomif/perl-config-inifiles .

    Regards,

    -- Shlomi Fish

     


Anonymous


Cancel   Add attachments