Subject: | read() seems not to read |
Execute the following code repeatedly - according to the docs, every
time you execute this, a new url should be added (time changes the url).
This doesn't happen, read doesn't seem to read the existing file
contents. Also, if you happen to call $map->xml() after reading to
introspect the contents, you always end up with an empty sitemap.
use Search::Sitemap;
my $map = Search::Sitemap->new();
$map->read( 'sitemap.xml' );
$map->add( loc => 'http://www.example.com/' . time );
$map->write( 'sitemap.xml' );