On Tuesday 30 July 2002 17:56, Perl Authors Upload Server wrote:
>     I am not at all wed to the suggested package name, but I couldn't
>     dream up anything better.
>
>     The package simply provides a valid consumer object to allow
>     XML::SAX::Writer to print to STDOUT inside a mod_perl handler.
>
>     By default, if no "output" widget is passed to XML::SAX::Writer, it
>     will print to STDOUT. This doesn't seem to work in a mod_perl
>     context, which means you have to create a scalar and fill it up with
>     stuff before printing it at the browser.
>
>     my $output = Apache::SAX::ConsumerObject->new($r); my $writer =
>     XML::SAX::Writer->new(Output=>$output);

There was talk at OSCon about XML::SAX::Writer consumer extensions. I don't 
know if any of those will happen, but the general idea was that they would go 
under the XML::SAX::Writer namespace. In this case that'd make it something 
along the lines of XML::SAX::Writer::ApacheConsumer.

I'm uncertain of whether that would be a good idea or not and am merely 
suggesting it as a possible alternative, for discussion. One downside is that 
it's a long name, one upside is that it's more descriptive (imho) of what it 
does than Apache::SAX::ConsumerObject.

Another option might be Apache::SAX::WriterConsumer. I think that's more 
explicit as it points out the link to XSW and doesn't include the "Object" 
part which is more of an implementation detail.

Finally, it may be possible to borgify that straight into XSW. If provided a 
$r object it could use that as its consumer (more dwimmery there, and imho 
generic enough to be worth including). If you think that's a good idea, I'll 
include it with the next release.

>     Matt Sergeant has already written a similar package for AxPoint,
>     but it would nice to have a simple bare bones consumer that does not
>     require installing all the stuff used by AxPoint.

There also was talk of making the Consumer-selection code more open to the 
outside world so that packages like AxPoint would not need to reimplement it. 
If you have any suggestion in that area, please send them to me (in personal 
mail as this is not the place) and I'll incorporate them into what is already 
there.

-- 
Robin Berjon <[EMAIL PROTECTED]>
  For every complex problem, there is a solution that is simple, neat
and wrong.
  -- H.L. Mencken(1880-1956)

Reply via email to