Skip Menu |

This queue is for tickets about the Config-Std CPAN distribution.

Report information
The Basics
Id: 75510
Status: open
Priority: 0/
Queue: Config-Std

People
Owner: Nobody in particular
Requestors: michael [...] jamhome.us
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Feature Request - vertically align output
Date: Mon, 27 Feb 2012 10:48:20 -0800 (PST)
To: bug-confgi-std [...] rt.cpan.org
From: "Michael R" <michael [...] jamhome.us>
Hi Guys! I hope my squirrel mail web interface doesn't screw up the formatting. Everything should be in a fixed width font. Given: File:   test.cfg (with vertically aligned = ) [Lazy Meal Sources] breakfast   = cafeteria lunch       = restaurant dinner      = wonderful wife [Non Lazy Meal Sources] breakfast   = Steel cut oats lunch       = home packed in pail dinner      = shared cooking with wife And test program t.pl: #!/usr/bin/perl use strict; use warnings; use Config::Std; my %meal_sources_config; my $cfg_file    = "test.cfg"; read_config( $cfg_file, %meal_sources_config ); $meal_sources_config{"Lazy Meal Sources"}{"Brunch"}     = "Neighborhood Restaurant"; $meal_sources_config{"Non Lazy Meal Sources"}{"Brunch"} = "New to us Restaurant"; write_config %meal_sources_config, $cfg_file; test.cfg is now: [Lazy Meal Sources] breakfast = cafeteria lunch = restaurant dinner = wonderful wife Brunch = Neighborhood Restaurant [Non Lazy Meal Sources] breakfast = Steel cut oats lunch = home packed in pail dinner = shared cooking with wife Brunch = New to us Restaurant All that alignment is gone.  I understand with malignantly long keys this is problematic.  But for cases where all keys lengths are reasonable ( <20 ? ) it seems sane for vertical alignment to be preserved. Perhaps by even capturing the original indentation.  Rational of request: Considering that "This configuration language and parser was specifically designed using the criteria suggested in this guideline (and elsewhere in this book)." [PBP 1st Ed. p447] It would seem fitting for it to also adhere to the guidelines presented elsewhere in the book.  Enough yak washing, it's time for me to return to work.  Thanks for the distraction. -- Michael Rasmussen Be Appropriate && Follow Your Curiosity
Show quoted text
> I hope my squirrel mail web > interface doesn't screw up the formatting. Everything should be in a > fixed > width font.
Works ok in web RT view, but not in my mail :-) Show quoted text
> I understand with malignantly long keys > this is problematic.  > But for cases where all keys lengths are > reasonable ( <20 ? ) it seems sane > for vertical alignment to be preserved. Perhaps by even capturing the > original > indentation. 
Interesting idea. Yes, getting the edge cases right is hard. Lots of edge cases here. Easiest may be to assume if someone has a ridiculous long key AND activates this feature, they'll live with ALL lines getting ridiculously long ? Show quoted text
> Rational of request: > Considering that > "This configuration language and parser was specifically designed > using the criteria suggested in this guideline (and elsewhere in > this book)." > [PBP 1st Ed. p447] It would seem fitting for it to also adhere to the > guidelines presented elsewhere in the book. 
Excellent argument! Damian's other criterion is for it to be MINIMAL feature set for support of re-writing, on which grounds we reject all feature requests for alternative punctuation schemes etc. No promises on this, but if it's easy, it sounds worth doing.