Mark Lawrence > XML-API > XML::API::Cache

Download:
XML-API-0.25.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.25   Source  

NAME ^

XML::API::Cache - Cached version of an XML::API object

SYNOPSIS ^

  use XML::API::Cache;
  my $cache = XML::API::Cache->new($xml_api_object);

  # store and then retrieve $cache somewhere
  # later:
  
  use XML::API;
  my $x = XML::API->new();
  $x->tag_open();
  $x->_add($cache);
  $x->tag_close();

DESCRIPTION ^

XML::API::Cache is a class for storing XML::API objects in a cache. XML::API objects are flattened, but their language attributes are kept, so that they can be efficiently stored and retrieved from somewhere but will still allow the caller to use them in the creation of XML.

METHODS ^

new

Create a new XML::API::Cache object. The first and only argument must be an XML::API object.

langs

Returns the values of the _langs() method from the original XML::API object. This is used by XML::API when _adding() the $cache to another XML::API object.

content

Returns the (fast) string value of the original XML::API object. '""' is overloaded so you can also just print $cache.

SEE ALSO ^

XML::API

AUTHOR ^

Mark Lawrence <nomad@null.net<gt>

COPYRIGHT AND LICENSE ^

Copyright (C) 2008 Mark Lawrence <nomad@null.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

syntax highlighting: