diff options
author | dakkar <dakkar@luxion> | 2008-12-29 13:06:44 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2008-12-29 13:06:44 +0000 |
commit | a8d60ac238363bde5fe5c4b0363f46bf0b1fed7f (patch) | |
tree | c71c20c066e7db0fffc9ae50b855e7bedbabb256 /lib/WebCoso/Common.pm | |
parent | fallback for die-ing writers: use the parser (diff) | |
download | WebCoso-a8d60ac238363bde5fe5c4b0363f46bf0b1fed7f.tar.gz WebCoso-a8d60ac238363bde5fe5c4b0363f46bf0b1fed7f.tar.bz2 WebCoso-a8d60ac238363bde5fe5c4b0363f46bf0b1fed7f.zip |
inizio dei feed
git-svn-id: svn://luxion/repos/WebCoso/trunk@396 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 'lib/WebCoso/Common.pm')
-rw-r--r-- | lib/WebCoso/Common.pm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/WebCoso/Common.pm b/lib/WebCoso/Common.pm index 7b610f2..665de33 100644 --- a/lib/WebCoso/Common.pm +++ b/lib/WebCoso/Common.pm @@ -20,19 +20,19 @@ $xpath->registerNs('x', 'http://www.w3.org/1999/xhtml'); sub langOf { my ($name)=@_; - $name=~m{(^|/)document\.([^.]+)(\.|$)} and return $2; + $name=~m{(^|/)(?:document|feed)\.([^.]+)(\.|$)} and return $2; return; } sub typeOf { my ($name)=@_; - $name=~m{(^|/)document\.[^.]+\.([^.]+\.[^.]+)$} and return $2; + $name=~m{(^|/)(?:document|feed)\.[^.]+\.((?:[^.]+\.)*[^.]+)$} and return $2; return; } sub typedAs { my ($name,$newtype)=@_; - $name=~s{(^|/)(document\.[^.]+\.)([^.]+\.[^.]+)$}{$1$2$newtype}; + $name=~s{(^|/)((?:document|feed)\.[^.]+\.)((?:[^.]+\.)*[^.]+)$}{$1$2$newtype}; return $name; } @@ -172,6 +172,7 @@ sub fromTo { else { push @ret,$file while $file=$iter->(); } + DEBUG("fromTo: @ret"); return uniq(@ret); } @@ -214,7 +215,10 @@ our %docfiles=( files=>sub{m{^document\.}}, dirs=>sub{!m{^(tags$|_|\.)}}); our %feedfiles=( - files=>sub{m{^feed\.[.]+\.tt$}}, - dirs=>sub{!m{^[^_.]}}); + files=>sub{m{^feed\.[^.]+\.tt$}}, + dirs=>sub{!m{^[_.]}}); +our %feedfilesXML=( + files=>sub{m{^feed\.[^.]+\.xml$}}, + dirs=>sub{!m{^[_.]}}); 1; |