This weekend, I released Excel::Template v0.01 to CPAN. It's a module with the same API as HTML::Template, but creates Excel spreadsheets (using jmcnamara's Spreadsheet::WriteExcel as the renderer). Right now, only a few features are supported, but more are on the way. I wanted to release a basic version so that I could get comments/suggestions quicker.

Features supported:

Features on the way:

Since this is my first CPAN module, I'd also love to have comments regarding how I did the packaging and POD. (I know I forgot to change the README ... that's first on the list to do.)

I also was at a loss as to how to write the tests. In my rewrite of PDF::Template, I wrote a mockup of pdflib_pl and tested my calls to that module, but there were only some 15 functions used. I'm using more in Spreadsheet::WriteExcel ... can the same method apply? Or, am I missing something really simple?

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Replies are listed 'Best First'.
Re: Excel::Template - request for comment
by adrianh (Chancellor) on Nov 24, 2003 at 14:14 UTC

    Hmm... I have it a once over when it hit CPAN. Read the POD for the main Excel::Template module. Couldn't get a firm idea of what it's function was. Discarded into my "look at in a few versions time" pile.

    So my first suggestion would be a more complete example of what I would be using the darn thing for ;-) It might be there in the other docs - but as a reader I'm just too darn lazy. It needs pointers from the main POD file if they're elsewhere.

    I also was at a loss as to how to write the tests. In my rewrite of PDF::Template, I wrote a mockup of pdflib_pl and tested my calls to that module, but there were only some 15 functions used. I'm using more in Spreadsheet::WriteExcel ... can the same method apply?

    This may well be me being dim - but can you describe what the difficulty with the tests is? Can you give an example of a piece of behaviour that you're not sure how to test?

      I have a given template behavior I want to test. The result of the execution is an XLS file. How do I automate verification that the XLS create is correct? If I use Spreadsheet::ParseExcel, then I'm now requiring another three modules to be installed on your system. If I don't, then what do I do?

      ------
      We are the carpenters and bricklayers of the Information Age.

      The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

      ... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

      Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

        If I dare, I would suggest you reduce a little bit your "signature", as it seems larger than the reply....

        But may be I should not dare as I am only a simple and humble accolyte.

        Would it be possible to create the test files locally and obtain a checksum (MD5 for example) for each? Then when you create them via your tests you need only check whether the checksums match. Digest::MD5 is a core module, so you could use that quite safely, and not have to worry about unnecessarily adding to the download/install burden.

        That's the way I would go at least.

        --
        Barbie | Birmingham Perl Mongers | http://birmingham.pm.org/

Re: Excel::Template - request for comment
by jmcnamara (Monsignor) on Dec 13, 2003 at 13:49 UTC

    People often post pre-releases of modules for comment and invariably the only comment is "I don't like the name".*

    Anyway, I don't like the name. When I first wrote Spreadsheet::WriteExcel I wanted to call it Excel::Writer but there was a Spreadsheet namespace in CPAN so I felt obliged to use that. I think that you could have followed suite.

    Other than that I think that it is a useful module.

    Update: In retrospect I see that the name is following the example of HTML::Template.

    --
    John.

    * Your::Momma. ;-)