[WM] bugs in webmake 2.2
Dimitry Kloper
dimka.cs.Technion.AC.IL
Thu Sep 26 04:58:04 IST 2002
I am using ActiveState perl on WinXP
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2001, Larry Wall
Binary build 633 provided by ActiveState Corp. http://www.ActiveState.com
Built 21:33:05 Jun 17 2002
The first bug I have encountered is that ${Webmake.Time} produces a wrong date string without the date number. I guess this is not a webmake but perl problem. Changing WebMake.Time case to the following:
if ($key eq "WebMake.Time") {
return scalar(localtime());
}
in get_deferred_builtin_content() fixed the problem.
The second bug is in make_file_finish(). Here we have eol substitution. For me it produced an extra ^M^M at the end of every output line. I don't think this is good behavior, it affects <pre></pre> environment in output, adding extra empty lines. I have just commented out eol substitution and everything runs well for me including right end of lines...
The third and most annoying problem is in sitemap:
Basically <sitemap> works always with all=true, even if all=false. By default it includes everything, even media files, contents which never go to <out>, etc... Ok, I didn't like this, so I did <attrdefault name="map" value="false" /> at the beginning of .wmk and then explicit map=true in important content items. But here comes another problem: It is impossible to get $[content.title] for contents which have map=false...
Ok, did some reading here and there and did workaround for the code:
<for name="ctx" values="${content_list}">
<content name="codedoc_${ctx}" format="text/html" up="home" map="true">
<{set tmp="${ctx}" }> Notice the problem here? There is no simple way ( at least no simple
<{perl documented way) to get <for> loop variable from <perl>.
my $name = get_content( 'tmp' );
my $c = get_content_object( $name );
my $title = $c->get_title();
set_content( 't', $title );
'';
}>
<wmmeta name="title" value="${t}" />
<wmmeta name="brief" value="${t}" />
...
</content>
</for>
Regards
--
Dima
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://amgod.boxhost.net/pipermail/webmake-talk/attachments/20020926/d66035ab/attachment.htm
More information about the Webmake-talk
mailing list