NAME
XML::API::Cache - Cached version of an XML::API object
VERSION
0.30 (2016-04-11)
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
AUTHOR
Mark Lawrence <nomad@null.net<gt>
COPYRIGHT AND LICENSE
Copyright (C) 2008,2015,2016 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.