ANNOUNCE: XML::Writer::String version 0.1 
Author Message
 ANNOUNCE: XML::Writer::String version 0.1

XML/Writer/String version 0.1
=============================

This module implements a bare-bones class specifically for the purpose
of capturing data from the XML::Writer module. XML::Writer expects an
IO::Handle object and writes XML data to the specified object (or
STDOUT) via it's print() method. This module simulates such an object
for the specific purpose of providing the required print() method.

It is recommended that $writer->end() is called prior to calling $s->value()
to check for well-formedness.

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

DEPENDENCIES

This module requires these other modules and libraries:

  XML::Writer

SYNOPSIS
  use XML::Writer;
  use XML::Writer::String;
  my $s = XML::Writer::String->new();
  my $writer = new XML::Writer( OUTPUT => $s );
  $writer->xmlDecl();
  $writer->startTag('root');
  $writer->endTag();
  $writer->end();
  print $s->value();

COPYRIGHT AND LICENCE

Copyright (C) 2002 Simon Oliver

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.



Sun, 05 Sep 2004 00:17:39 GMT  
 ANNOUNCE: XML::Writer::String version 0.1

Quote:

>XML/Writer/String version 0.1
>XML::Writer expects an IO::Handle object and writes XML data to the
>specified object (or STDOUT) via it's print() method. This module
>simulates such an object for the specific purpose of providing the
>required print() method.

Isn't there already such a module for tying a string to a filehandle?

--

Finger for PGP key



Mon, 06 Sep 2004 04:42:56 GMT  
 ANNOUNCE: XML::Writer::String version 0.1

Quote:


> >XML/Writer/String version 0.1

> >XML::Writer expects an IO::Handle object and writes XML data to the
> >specified object (or STDOUT) via it's print() method. This module
> >simulates such an object for the specific purpose of providing the
> >required print() method.

> Isn't there already such a module for tying a string to a filehandle?

Yes, there are a number of other modules that provide this facility,
including IO::Stringy but they also provide a lot more than is required.
This minimalist module provides only the necessary methods to make things
work and more importantly an example of how to do it with XML::Writer.

--
  Simon Oliver



Mon, 06 Sep 2004 22:27:01 GMT  
 ANNOUNCE: XML::Writer::String version 0.1

Quote:



> > >XML/Writer/String version 0.1

> > >XML::Writer expects an IO::Handle object and writes XML data to the
> > >specified object (or STDOUT) via it's print() method. This module
> > >simulates such an object for the specific purpose of providing the
> > >required print() method.

> > Isn't there already such a module for tying a string to a filehandle?

> Yes, there are a number of other modules that provide this facility,
> including IO::Stringy but they also provide a lot more than is required.
> This minimalist module provides only the necessary methods to make things
> work and more importantly an example of how to do it with XML::Writer.

In perl5.8.0 this facility will be built into the core.

        my $string;
        open(my $fh, ">", \$string);
        print $fh "...";

Regards,
        Slaven

--

need xpm or ppm output from GD?
        http://search.cpan.org/search?mode=module&query=GD::Convert



Tue, 07 Sep 2004 04:23:29 GMT  
 ANNOUNCE: XML::Writer::String version 0.1

Quote:

>> Isn't there already such a module for tying a string to a filehandle?

> Yes, there are a number of other modules that provide this facility,
> including IO::Stringy but they also provide a lot more than is required.

There is also IO::String, which is slimmer than
IO::Stringy. But either module offers a much more
general approach to the problem.

As a programmer, I'd prefer using a more
general abstraction, because otherwise there
might be too many specialised helper modules
for me to keep track of. Some of them might
even introduce obscure API dialects.

The task of glueing a scalar and a filehandle
together is not limited to XML::Writer.

cheers,
--
Toni Andjelkovic



Tue, 07 Sep 2004 08:02:20 GMT  
 ANNOUNCE: XML::Writer::String version 0.1
If you have benchmarks showing that XML::Writer::String is much faster
than using the general IO::String module, then there's a reason for
having a separate module.  But otherwise isn't it just reinventing the
wheel?

Presumably the fact that IO::String supports some extra features for
tying strings to filehandles does not make it any more difficult or
more complex to use for the purpose of capturing XML::Writer output.

--

Finger for PGP key



Tue, 07 Sep 2004 17:56:09 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. ANNOUNCE: Tk::ObjScanner Beta version 0.1

2. ANNOUNCE: Tcl Dynamic Loader package version 0.1

3. ANNOUNCE: XML::LibXML 1.53 and XML::LibXML::Common 0.10

4. ANNOUNCE: XML::LibXML 1.53 and XML::LibXML::Common 0.10

5. ANNOUNCE: XML::Records 0.10

6. ANNOUNCE: libwin32 version 0.10 released

7. ANNOUNCE: Inline::Python version 0.10

8. ANNOUNCE: Inline::CPR version 0.10

9. ANNOUNCE - Spreadsheet::WriteExcel, Version 0.10

10. Tk::MDI version 0.1

11. ANNOUNCE: COBRA::IOP::IOR 0.1

12. ANNOUNCE: Text::Vpp 0.1 BETA release

 

 
Powered by phpBB® Forum Software