That is correct, it is just a simple subclass that provides a _data_query
sub. It also requires the use of another module to parse the sql query.
The fields in the query are assumed to be the fields that are used for the
report (I figured why would someone put the fields in the query if they
don't want them returned in the report).
I've modified the module name to be Spreadsheet::WriteExcel::FromDB::Query
so that it shows that the module was derived from your code. Would you
prefer if I kept the code from Spreadsheet::WriteExcel::FromDB in it's
entirety in the Spreadsheet::WriteExcel::FromDB::Query module or can I
remove the portions of the code that it won't be using (like the
ignore_columns, include_columns functions)? I would just inherit from it,
but the module doesn't have a new function, just a read function that
blesses the new object, and I can't think of a way to simply add the fields
without taking your original code and modifying it.
Thank you again for your feedback,
Christopher Kois
On 5/2/06, Tony Bowden via RT <bug-Spreadsheet-WriteExcel-Simple@rt.cpan.org>
wrote:
Show quoted text>
>
> <URL:
http://rt.cpan.org/Ticket/Display.html?id=19028 >
>
> On Tue, May 02, 2006 at 09:04:02AM -0400, Christopher Kois via RT wrote:
> > I wanted to modify
> > that module to export the results of a query to an Excel
> spreadsheet. I've
> > made the modification to the module and have been using it to generate
> > simple Excel reports from database queries. Since the new module was
> > derived from your existing module, I wanted to get your feedback on
> > publishing this new module to CPAN.
>
> When you say "derived from", I presume that it's just a simple subclass
> that provides a different _data_query() sub? If there was anything more
> difficult to subclass then I'd appreciate it if you could let me know so
> that I could look at making it simpler.
>
> > "Spreadsheet::WriteExcel::FromDBQuery" and in the POD documentation I
> would
> > clarify that the module I created was derived from your module with
> links to
> > your "Spreadsheet::WriteExcel::FromDB", and
> > "Spreadsheet::WriteExcel::Simple" modules. Would you have any objection
> to
> > this or would you recommend using a different name for the module?
>
> The name seems mostly fine, although I would have have a very slight
> preference for ::FromDB::Query, so that it's more clearly 'under' this
> module, rather than parallel to it. But that's entirely up to you.
>
> Tony
>
>