diff options
author | dakkar <dakkar@luxion> | 2009-01-07 14:39:04 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2009-01-07 14:39:04 +0000 |
commit | a2c0093cd8a0e9633bba0a2e1a520a73c725a628 (patch) | |
tree | 42b3ff84031330afb0843e0395fbbe4e7416ee5d /lib/WebCoso | |
parent | pulizia dei path, ma non va proprio bene (diff) | |
download | WebCoso-a2c0093cd8a0e9633bba0a2e1a520a73c725a628.tar.gz WebCoso-a2c0093cd8a0e9633bba0a2e1a520a73c725a628.tar.bz2 WebCoso-a2c0093cd8a0e9633bba0a2e1a520a73c725a628.zip |
i feed dei tag vanno!
git-svn-id: svn://luxion/repos/WebCoso/trunk@405 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 'lib/WebCoso')
-rw-r--r-- | lib/WebCoso/XSLT.pm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/WebCoso/XSLT.pm b/lib/WebCoso/XSLT.pm index 09c5b3f..9cbeab0 100644 --- a/lib/WebCoso/XSLT.pm +++ b/lib/WebCoso/XSLT.pm @@ -7,6 +7,7 @@ use XML::LibXML; use XML::LibXSLT; use DateTime::Format::Strptime; use Log::Log4perl ':easy'; +use Data::Dumper; my $NS='http://webcoso.thenautilus.net/'; @@ -99,10 +100,17 @@ sub fillFeed { sub setXMLTagsSource { my ($self,$source)=@_; - $self->{tags_source}=$source; + # the weird copy seems to be needed, otherwise sometimes it looks empty + $self->{tags_source}=(defined $source) ? {%$source} : undef; + delete $self->{tags_document}; } sub getTagsXML { my ($self)=@_; + if (defined $self->{tags_document}) { + DEBUG('returing cached TagsXML'); + return $self->{tags_document} + } + DEBUG('building TagsXML'); my $doc=XML::LibXML::Document->new(); return $doc unless defined $self->{tags_source}; @@ -127,7 +135,7 @@ sub getTagsXML { } } } - return $doc; + return $self->{tags_document}=$doc; } { |