[WM] perl code - what am I doing wrong here?
Thomas Mueller
webmake.s2h.cx
Fri Aug 24 20:58:24 IST 2001
Hello,
Can anybody tell me, what I am doing wrong here? This used to be
part of a large webmake file. I ripped it out in order to
demonstrate the problem here. When I give it to webmake I get the
error "Use of uninitialized value at
/usr/lib/perl5/site_perl/5.005/IO/String.pm line 112.".
<webmake>
<content name="hochzeit_section_vorher">
<wmmeta name="subdir" value="vorher"/>
</content>
<content name="template">
<html>
<head>
</head>
<body>
<{perlout
use HTML::WebMake::Content;
my @sections =
content_names_to_objects(content_matching('hochzeit_section_*'));
foreach my $sec (@sections) {
print "section: ", $sec->get_name(), "<br>\n";
print "subdir: ", $sec->get_metadata('subdir'), "<br>\n";
}
}>
hallo
</body>
</html>
</content>
<out name="header" file="test.html">
${template}
</out>
</webmake>
What I would have expected was the perl code finding one matching
content chunk, print its name (which it does) and then print
content the metadata item called subdir (which it doesn't).
MfG :-)
Thomas Mueller
More information about the Webmake-talk
mailing list