Click here to get back home

Formatting -- recommended module

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Formatting -- recommended module harryfmudd [AT] comcast [DOT] 11-10-2006
Posted by harryfmudd [AT] comcast [DOT] on November 10, 2006, 12:41 pm
Please log in for more thread options


All,

I'm looking for a formatter module whose user interface looks a bit like
strftime or printf, but allows me to hook whatever back-end code I want
to the formatting. It needs to be able to produce columnar output.
Headings based on the conversion characters used would be a distinct plus.

For example, a user should be able to easily ask for right ascension
(degrees or hours, minutes and seconds) and declination - or elevation
and azimuth if he or she so chooses; preferably without me having to
calculate both ahead of time (because the user typically only wants one
or the other).

I haven't found a real good match on CPAN, but that may be because there
are so many I've missed one somehow. The closest I have come is:

* String::Format doesn't seem to have width control, and requires me to
pre-calculate everything I might want to display.

* String::FormatX requires me to pre-calculate everything and provide my
own machinery to tie it into a format string.

* Data::Display simply marshalls existing data into columns.

* Data::MaskPrint appears to handle only numeric data (I have string
data as well).

I have no doubt that Template-Toolkit would do the job, but I would like
not to put users through that learning curve.

Any thoughts?

Tom Wyant

Posted by harryfmudd [AT] comcast [DOT] on December 1, 2006, 10:43 am
Please log in for more thread options


harryfmudd [AT] comcast [DOT] net wrote:

> All,
>
> I'm looking for a formatter module whose user interface looks a bit like
> strftime or printf, but allows me to hook whatever back-end code I want
> to the formatting. It needs to be able to produce columnar output.
> Headings based on the conversion characters used would be a distinct plus.
>
> For example, a user should be able to easily ask for right ascension
> (degrees or hours, minutes and seconds) and declination - or elevation
> and azimuth if he or she so chooses; preferably without me having to
> calculate both ahead of time (because the user typically only wants one
> or the other).
>
> I haven't found a real good match on CPAN, but that may be because there
> are so many I've missed one somehow. The closest I have come is:
>
> * String::Format doesn't seem to have width control, and requires me to
> pre-calculate everything I might want to display.
>
> * String::FormatX requires me to pre-calculate everything and provide my
> own machinery to tie it into a format string.
>
> * Data::Display simply marshalls existing data into columns.
>
> * Data::MaskPrint appears to handle only numeric data (I have string
> data as well).
>
> I have no doubt that Template-Toolkit would do the job, but I would like
> not to put users through that learning curve.
>
> Any thoughts?
>
> Tom Wyant

Since there are no replies in three weeks, I'm proposing my own. See
thread "Proposal: String::Format::General" to be posted shortly.

Tom Wyant

Similar ThreadsPosted
Ask for recommended module for precise number January 22, 2006, 3:25 am
Date and time--recommended module? November 8, 2006, 3:41 pm
[RFC] HTML::Dashboard (Spreadsheet-like formatting for HTML tables) April 16, 2007, 4:50 pm
My Net::eBay PERL module now recommended by eBay itself September 2, 2005, 3:24 am
Lower case module name for non-pragma module January 4, 2005, 10:19 am
RFC: New module 'Module::Bundled::Files' August 26, 2005, 3:49 pm
help with an MD5.pm module!! September 3, 2005, 11:39 pm
Looking for RTP module December 9, 2004, 9:17 pm
module for FFT May 9, 2005, 3:06 pm
Module may not be right one? April 27, 2006, 12:57 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap